Question: This is a group project requiring us to make a battleship game (instructions below). We have one group member coding a ship object, another coding

This is a group project requiring us to make a battleship game (instructions below). We have one group member coding a ship object, another coding the UI Board, another coding the AI and I have to code the ocean object/board. The information I have on the ocean board is as follows: Ocean object/board = contains ships - private ship grid (8x8 grid) The methods it should have are: addShip method, fireAtCoordinate method (returns boolean to check if a hit or miss), scanCoord method (returns whatever is in coordinate). Please write the code for the ocean board class. *I am using JGrasp so please make sure it is compatible *Please comment throughout code

This is a group project requiring us to make a battleship game

9. One-player Battleship Game On an 8 x 8 grid allow a player to choose locations for 3 boat objects (one of length 2, one of length 3, one of length 4) and have the computer randomly do the same thing (make sure they all fit on the grid. Alternate turns between the human player and the computer and when a battleship is sunk print "You Sunk my Battleship! the game is over when all three of one players ships are sunk. The computer could just use the Math rand function to guess a place to attack but you can also make it smarter by keeping an array of points where it scored a hit and then adding to that. More information here: http://en. wikipedia.org/wiki/Battleship (game)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!