Question: Imagine we are using a two-dimensional array as the basis for creating a one-player game of battleship. (The computer generates the board and places the

Imagine we are using a two-dimensional array as the basis for creating a one-player game of battleship. (The computer generates the board and places the ships and the player has to guess the ship positions.) In the game a '~' character represents ocean, a '#' character represents a part of a ship, an 'H' character represents a place where a part of a ship has been hit, and a '.' character represents a miss.

Determine what data structures you will need and how they will be defined.

Determine what functions you will need and specify their prototypes w/ pre/post conditions

Write the pseudocode for the main function.

Be prepared to discuss/support your choices.

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!