Ship Game

Example of the Ship Game board printed to the console

I’ve added the second of the two projects I mentioned in my previous post. ShipGame is a Battleship-like game for two players. This code provides a backend for the game written in Python.

Each player has a 10x10 grid on which they place their ships. On their turn, the player fires a torpedo at a square on their opponents grid. Player ‘first’ gets the first turn, after which the players alternate. A ship is sunk when all of its squares have been hit. A player wins when all of their opponents ships have been sunk.

source code

Updated Dec 10 2022