Question
Assistance needed for the following C Programming assignment: Battleship Game Outcome: Demonstrate the ability to design a menu driven program, 2D arrays, strings, logic, thought,
Assistance needed for the following C Programming assignment:
Battleship Game
Outcome: Demonstrate the ability to design a menu driven program, 2D arrays, strings, logic, thought, and IO.
Program Specifications: The program will simulate a one player version of the classic game Battleship. The goal of this version is to sink all 5 ships using the lowest possible number of missiles.
The game is played on a 10 x 10 grid. The columns of the grid will be labeled A, B, C, D, E, F, G, H, I, and J. The rows of the grid will be numbered 1 10.
The 5 ships will be randomly placed on the game board. Neither the programmer nor the user will have any idea where the ships have been placed. The ships can be placed vertically or horizontally. All ships must be located within the 10 x 10 grid.
Game Play: The user will select a row and column combination and fire a missile. If the missile hits a ship the grid will display the letter H to indicate a ship was hit. The user will continue to fire missiles until all ships have been sunk. Once a ship has been sunk, the Hs will be replaced by the letters that represent the ship that has just been sunk.
Cruiser = 2 holes = C
Submarine = 3 holes= S
Destroyer = 3 holes = D
Battleship = 4 holes= B
Aircraft Carrier = 5 holes = A
As the game is played, somewhere on the screen the user will see how many missiles have been fired, the name of each ship that is still floating, and the name of each ship that has been sunk.
Other Rules: The game will have an option to display the past 10 best scores, therefore it will store the top best scores (lower score the better).
You will allow the user to see the top 10 scores. You will allow the user to play the game. You will allow the user to quit the game.
You cannot use global variables or goto statements.
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