Project 4: Battleship
EECS 183. Winter 2020 eecs183.org Table of Contents
Learning Objectives
Honor Code
Grading
Working with a Partner
Distribution Code
Testing
Classes
Position
Ship
Player
The load_grid_file() function
Game
Non-default constructor
The start() function
Operator Overloading
(File) I/O
File Locations
battleship.cpp
Sample Run
Sample run 1
Sample run 2
Sample run 3
Sample run 4
Sample run 5
Function Table
Testing
Bugs To Expose
How to submit
Battleship
Test Suite
Smore
*UPDATED:* due Friday, 27 March Friday, 20 March 2020 at 6:00 p.m.
In this project, you will use C++ to create the classic Battleship game. You will implement it as a one-player game so a user will always be playing against the CPU. If youre not a familiar with the game, take a look at the wikipedia page. Your game program will be able to read the player and CPU grids –containing the locations of war ships– using text files. Once the grids are setup, a user will continuously play the game by typing the moves they wish to play against the CPU. In turn, the CPU will retaliate with its own move. The game ends when all ships from either the user or the CPU are taken down, or when the maximum number of rounds is reached.