Battleship!

Important Note

Do not modify code outside of outside of the areas marked with TODO. It is intended that code will be inserted where the TODO tag is at, but the provided code does not need to be edited.

Purpose

Matplotlib is an incredibly powerful library that is able to be used for more than just data representation. In this assignment, a battleship game is created using an interactive GUI made from matplotlib. Taken from Wikipedia, "Battleship (also Battleships or Sea Battle[1]) is a guessing game for two players. It is played on ruled grids (paper or board) on which the players' fleets of ships (including battleships) are marked. The locations of the fleet are concealed from the other player. Players alternate turns calling "shots" at the other player's ships, and the objective of the game is to destroy the opposing player's fleet."

Partners

You are encouraged to work with one other partner on this assignment. If you work with a partner, you must both be in the same lab section.

Preliminaries

Create a python project named battleship. Place the following files into this project:

Battleship

Using the provided code, there are [number] blocks of code that need to be changed, each marked with a comment starting with TODO. It is recommended to do them in order, but not required. To run the code, run gui.py from the python3 terminal. It is required that numpy and matplotlib be installed on the machine.

100-Point Grading Rubric

Submission

Upload your submission to the D2L Dropbox by the end of the lab period. Submissions after 11:59PM on the due date are considered late. Late submissions receive no credit, but partial credit can be earned by making an on time submission.