Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Complex java project(for me)

Options
  • 23-09-2010 2:32pm
    #1
    Closed Accounts Posts: 11


    So i have a java project on Battleship to work on and this time i'm supposed to use only loops and if statements. My biggest problem is the design. Rough sketch of what i have so far:

    // initialize arrays and variables for the two players

    // initialize grids

    // ask username, ask PvP or PvC, place pieces(print to grids)

    // print grids to move

    // get move
    get coordinates, shoot(on board or not)
    hit or miss(points?)

    // switch players
    // computer turn
    generates coord, shoots, hit or miss(randomize)

    // switch players
    loop to (print grids to move)

    So far, this is what i've ben able to design. Again, i'll appreciate any and all assistance that is given.


Advertisement