Skip to content

Instantly share code, notes, and snippets.

@triage
Last active January 15, 2021 14:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save triage/9072136243f4e68d64c824ca0711cbe2 to your computer and use it in GitHub Desktop.
Save triage/9072136243f4e68d64c824ca0711cbe2 to your computer and use it in GitHub Desktop.
BATTLESHIP
Five different types of ships:
1. Carrier (5)
2. Submarine (3)
3. Destroyer (3)
4. Battleship (4)
5. PT (2)
Board:
A-J (x-axis)
1-10 (y-axis)
Gameplay:
1. You and I place our ships
2. Take turns firing on the other, by sending a coordinate IE: "B", "2"
Response:
1. miss
2. hit
3. sunk (battleship)
4. sunk, win the game
Clarifications:
1. Multiplayer (you have a machine, I have a machine)
2. We already have the same URL battleshipgame.com/abc123
3. No DB. Store everything in memory. Assume there's just one instance.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment