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
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Complex java project(for me)

  • 23-09-2010 1: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