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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started