Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I need help with this project in C and would appreciate help with it. CS 100 Programming I Project 3 Revision Date: October 2, 2015
I need help with this project in C and would appreciate help with it.
CS 100 Programming I Project 3 Revision Date: October 2, 2015 Preamble You may develop your code anywhere, but you must ensure it runs correctly on a Linux distribution before submission Battleship! "You sunk my battleship!" - Annoying TV Kid Battleship is a classic Milton-Bradley game, where two players, in secret, position their navy on a grid. Each ship in the navy covers a contiguous horizontal or vertical section of grid cells. The type of ship determines the number of grid cells covered. The players, in turn, lob salvos at each other's navy by calling out grid locations. Should a salvo coincide with a grid cell covered by a ship location, the attacked player calls out "hit". If the salvo does not coincide with a cell covered by a ship, the attacked player calls out "miss". If all the cells covered by a single ship are hit, the attacked player calls out "sunk". The first player to sink all of the opponent's ship wins. Here is an example of one player's grid after three salvos by the opponent The salvo to grid location (2,8) was a miss, the one to location (4,5) was a hit, and the one to (5,5) was another miss. The grid also illustrates a typical navy: a carrier in blue, a battleship in green, a destroyer in red, a submarine in aqua, and a patrol torpedo boat in yellow Your task is to build a battleship-playing program that will outsmart your classmates programs May the best program win! CS 100 Programming I Project 3 Revision Date: October 2, 2015 Preamble You may develop your code anywhere, but you must ensure it runs correctly on a Linux distribution before submission Battleship! "You sunk my battleship!" - Annoying TV Kid Battleship is a classic Milton-Bradley game, where two players, in secret, position their navy on a grid. Each ship in the navy covers a contiguous horizontal or vertical section of grid cells. The type of ship determines the number of grid cells covered. The players, in turn, lob salvos at each other's navy by calling out grid locations. Should a salvo coincide with a grid cell covered by a ship location, the attacked player calls out "hit". If the salvo does not coincide with a cell covered by a ship, the attacked player calls out "miss". If all the cells covered by a single ship are hit, the attacked player calls out "sunk". The first player to sink all of the opponent's ship wins. Here is an example of one player's grid after three salvos by the opponent The salvo to grid location (2,8) was a miss, the one to location (4,5) was a hit, and the one to (5,5) was another miss. The grid also illustrates a typical navy: a carrier in blue, a battleship in green, a destroyer in red, a submarine in aqua, and a patrol torpedo boat in yellow Your task is to build a battleship-playing program that will outsmart your classmates programs May the best program winStep 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