Results 1 to 7 of 7
Thread: Java Battleship Program
- 11-14-2012, 07:38 PM #1
Member
- Join Date
- Nov 2012
- Posts
- 6
- Rep Power
- 0
Java Battleship Program
Hi, I would really appreciate it if someone helps me create a battleship program in Java? It is a board of 10 rows x 10 columns and it includes classes:
ship
ship part
board
I am struggling to start it off! Also I would need a 2D array in the program to initialize the actual board game
The game will be based on plotting the right co ordinates to sink the ships! It will be user vs computer.
Would really appreciate it if someone can help with this?
I use BlueJ for the program but any java code will help.
Thanks
Zizou
- 11-14-2012, 07:43 PM #2
Re: Java Battleship Program
Which part of this is giving you trouble? What do you have so far? What exactly are you stuck on?
How to Ask Questions the Smart Way
Static Void Games - GameDev tutorials, free Java and JavaScript hosting!
Static Void Games forum - Come say hello!
- 11-14-2012, 07:46 PM #3
Member
- Join Date
- Nov 2012
- Posts
- 6
- Rep Power
- 0
Re: Java Battleship Program
Ive got 3 classes but I'm struggling to even start this off! I need a concept of what kind of implementation I would need to construct the 2d array but im having difficulties understanding how to do this.
- 11-14-2012, 07:53 PM #4
Re: Java Battleship Program
Start off with a single class that simply displays a 2D grid of booleans. True means they're filled, false means they aren't. From there, you can add ships that take up specific coordinates, then from there you can get into user interaction and placement.
Breaking it up into individual steps also makes it easier for us to help you. If you get stuck displaying the grid, put together an SSCCE that demonstrates only that part, and we'll go from there.How to Ask Questions the Smart Way
Static Void Games - GameDev tutorials, free Java and JavaScript hosting!
Static Void Games forum - Come say hello!
- 11-14-2012, 08:02 PM #5
Member
- Join Date
- Nov 2012
- Posts
- 6
- Rep Power
- 0
Re: Java Battleship Program
I really need someone to do this for me! As I know I cant do this on my own! At-least if someone starts it off with the right methods and classes and I will finish it off!
- 11-14-2012, 08:06 PM #6
Re: Java Battleship Program
That isn't how this works. We aren't a codemill or a homework service. We'll be happy to help you, but you have to show some initiative first. Up to you.
How to Ask Questions the Smart Way
Static Void Games - GameDev tutorials, free Java and JavaScript hosting!
Static Void Games forum - Come say hello!
- 11-15-2012, 09:21 AM #7
Re: Java Battleship Program
zizou001 is banned for 1 month for misbehaving. See http://www.java-forums.org/new-java/...p-program.html
db
THREAD CLOSEDIf you're forever cleaning cobwebs, it's time to get rid of the spiders.
Similar Threads
-
Battleship Program
By zizou001 in forum New To JavaReplies: 6Last Post: 11-15-2012, 09:21 AM -
Help with Revised Battleship program
By Lucid15 in forum New To JavaReplies: 1Last Post: 04-19-2012, 08:18 AM -
Having trouble, Battleship program
By Corrrrr in forum New To JavaReplies: 15Last Post: 03-09-2012, 04:08 AM -
Help with Battleship program! 2D arrays
By tylerkung in forum New To JavaReplies: 3Last Post: 09-23-2011, 02:45 PM -
Battleship 2D Array Program
By AaronHopkins in forum New To JavaReplies: 6Last Post: 04-05-2011, 05:38 AM
Bookmarks