Can you do this for me in c++?
Sample Battlefield Grid.xlsx A B C D E F G H I J 1 2 2 2 2 2 3 1 4 1 5 1 3 3 3 6 1 7 1 4 4 4 8 5 9 5 10 Ship Type and Size Ship 1 ‐ Carrier, 5 Squares Ship 2 ‐ Battleship. 4‐Squares Ship 3 ‐ Cruiser, 3 Squares Ship 4 ‐ Submarine, 3 Squares Ship 5 ‐ Destroyer, 2 Squares Example CSV File Carrier,B3,VD Battleship,D1,HR Cruiser,I5,HL Submarine,D7,HR Destroyer,I9,VU SPU CSC 2430 Winter 2021 Final Project Summary For your Project, you will develop a simple battleship game. Battleship is a guessing game for two players. It is played on four grids. Two grids (one for each player) are used to mark each players' fleets of ships. The locations of the fleet (these first two grids) are concealed from the other player so that they do not know the positions of the opponent's ships. Players alternate turns by "firing" at the other player's ships. The objective of the game is to destroy the opposing player's entire fleet. In your game, "firing" will be allowing the player to take a guess at where on the grid their opponent may have placed a ship. Requirements You are to design the classes and implement the game. You are in full control of the choice of classes (please use classes appropriately or points will be deducted), data structures, algorithms, internal file format, detailed user interface scheme, or any other pertinent design decisions you need to make. The Battleship game you are implementing is a simplified version of the electronic Battleship game played in one player mode. The game is played on four grids, two for each player. Each player has a Battlefield Grid and a Firing Grid. The grids are a 10 by 10 square. The individual squares in the grid are identified by the x coordinate (indicated by a letter) followed by the y coordinate (indicated by a number). For example: A B C D E F G H I J 1 2 3 4 5 6 7 8 9 10 SPU CSC 2430 Winter 2021 Final Project The Battlefield Grid holds the position of each player's fleet and the status of the fleet. The Firing Grid hold the coordinates of each "Firing" during the game and whether the shot was a hit or miss. Each player will have five ships to place on their Battlefield Grid. Each player will vary in size (the number of squares they take up) based on Ship Type. The ships cannot overlap, so only one Ship can occupy any given square in the grid. The types and numbers of ships allowed are the same for each player. Table 1 – Ship types and sizes Type Size Carrier 5 Battleship 4 Cruiser 3 Submarine 3 Destroyer 2 The game is played in rounds. In each round, each player takes a turn to fire at a target square in the opponent's Battlefield Grid. The opponent then indicates whether the shot was a hit (a ship occupied the square) or a miss (there was no ship in the square). If the shot is a "miss", the attacked player marks their Battlefield Grid with a white peg (X in our game); if a "hit" they mark their Battlefield Grid with a red peg (O in our game). The attacking player then indicates the hit or miss on their Tracking Grid with the appropriate color peg (red (0) for "hit", white (X) for "miss") so that they can understand where the opponent's Ship might be. In the board game, once all the coordinates of a ship have been hit, the Ship is sunk, and the Ship's owner announces, "You sunk my battleship! (Or whatever the particular Ship is that was destroyed). For our purposes, we will consider a battleship sunk if the opponent has a single hit. When all of one player's ships are sunk, the other player wins the game. For your game, you will create a one-person version of the game where 'the computer' will play for the second player. Part 1 – Design the program. (30% of Total) − Build a UML Class Diagram for any classes you create. − Describe the principle functions you will be using, their purpose, parameters, and return type. − Create a Process Flow Diagram that describes how control flows through your program. Part 2 – Develop and test the code. (70% of Total) − This seems self explanatory. SPU CSC 2430 Winter 2021 Final Project Game Setup At the beginning of the game, you will read a file that will be used to set up your Battlefield Grid. The file should be named "ship_placement.csv". This will be a comma-delimited file containing a line for each Ship in your fleet. Each line will be in the format: ShipType, StartPos, Direction StartType is a string identifying the type of Ship from Table 1. StartPos is the coordinates of the starting position of the Ship. For example, A5 or C9. Direction is a two-position indicator describing how the Ship should be positioned. The first position indicates whether the Ship should be positioned horizontally or vertically (H or V). The second position indicates whether the Ship should be laid out from left to right or right to left (L or R) in the case of a Horizontal positioning, or Down to Up or Up to Down (D or U) in the case of vertical positioning. For example, a line with the values "Battleship, D4, HR" would position a Battleship on the Battlefield Grid at squares D4, E4, F4, and G4. A line with the values "Cruiser, E9, VU" would position a Cruiser on the Battlefield Grid at squares E9, E8, and E7. De appropriate error checking on both the file input and the content. I will use various correct and incorrect files to test your code. Please keep in mind that ships can not overlap on the grid. After your Battlefield Grid is setup, randomly place the computer's ships on its Battlefield Grid. Again be careful not to overlap ships. Game Play. Randomly select who will start the game, the Computer Player (CP), or the Human Player (HP). Proceed in rounds with both the CP and the HP getting a turn to "fire" into the other player's Battle Grid in turns. Firing is done by selecting a square on the opposing player's Battlefield Grid. The HP will choose the square by entering the grid coordinates. The CP will randomly choose a square that has not yet been selected. If the selected square is occupied by a ship, that Ship is considered sunk. It's position should be notated on the Firing Grid and it should be identified as "sunk". If the selected square is not occupied, that square should be marked as "missed" on the Firing Grid so it will not be chosen again. When prompting the HP for firing coordinates, also give them the option to quit the game if desired. Winning the Game. When a player has sunk all of the opposing plays ships, the game ends. Identify the winner and display the Battlefield and Firing grids of each player. SPU CSC 2430 Winter 2021 Final Project Game Design suggestions: − Create a Battlefield Grid Class and instantiate two objects from it. One for the Computer Player and one for the Human Player. − Create a Firing Grid Class and instantiate two objects from it. One for the Computer Player and one for the Human Player. − Create a Ship Class and instantiate a ship object for each ship type for both the HP and CP. − Use a two-dimensional vector of char type to represent the grids. − Make the game as fault-tolerant as possible. You never know what I will enter. − After each round, display a summary showing the CP and HP status. Also, display the HP's Battlefield and Firing grids. Part 1 Rubric: Total points available for the Part 1: 69 Points are allocated as follows: − UML Class Diagram 30% − Function List and Signatures 35% − Process Flow Diagram 35% Part 2 Rubric: Total points available for the Part 2: 161 Points are allocated as follows: − Compilable Code 15% − Implements Solution 20% − Gameplay 15% − Uses Classes 15% − Uses Vectors 15% − Uses Exception Handling 15% − Commented Code 5% Deliverables: − A single compressed (either .zip or .rar) file folder containing the source code files only. Don’t just zip the whole project folder. Please label the folder in this format: [Last Name]+”_final.zip (or .rar)” For example: vickers_final.zip − Submit the file on Canvas