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
Get step-by-step solutions from verified subject matter experts
