Question
Need to write a program in C+ using arrays Battleship is played on a 10 x 10 grid. The game begins with the five ships
Need to write a program in C+ using arrays
Battleship is played on a 10 x 10 grid. The game begins with the five ships (see below) being placed Ships: 1. (C) Crusor (2 Holes) 2. (A) Aircraft Carrier (5 Holes) 3. (B) Battleship (4 Holes) 4. (S) Submarine (3 Holes) 5. (D) Destroyer (3 Holes) You will show the player the grid without the ships. If the player's MISSLE misses you will display an M for MISS. If the player MISSLE hits a ship then you will place an H for hit. After a ship has been sunk, you will replace the H with the actual letter for teh sunk ship (see letters above). Once a ship has been sunk you will change the ship from floating to sunk. Your code needs to randomly place the five ships at the beginning of the game. Your code needs to keep track of all right and wrong guesses. The game ends when all ships are sunk. After each MISSLE you will display the 10 X 10 Grid allow with a MISSLE counter. The goal is for the user to sink all ships with while using the least amount of missles. Somewhere on the screen below the grid you will show the five ships and whether or not that are floating or sunk. The game will have an option to display the past 10 best scores.
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