Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.
Hi all, please see this major site announcement: https://www.boards.ie/discussion/2058427594/boards-ie-2026

Complex java project(for me)

  • 23-09-2010 10:53AM
    #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. I'm not sure if this is the right place to post this, but i figured any help wld be appreciated. 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'm not sure if this is the best place to post this thread, but i'll appreciate any and all assistance that cld be offered.


Comments

  • Registered Users, Registered Users 2 Posts: 1,636 ✭✭✭henbane


    This might be better suited to the development forum. It wouldn't be a bad idea read their rules re homework questions in the charter.


  • Closed Accounts Posts: 6,081 ✭✭✭LeixlipRed


    No back seat modding thanks! We've been through this with this poster already, he knows the score.


Advertisement