Pyttleship is python implementation of world-popular game Battleship.
In our python implementation of game we are going to follow Russian rules:
- It is played on a 10x10 grid.
- Player takes another shot on the same turn if an enemy ship is hit.
- Ships cannot occupy squares next to each other, horizontally, vertically or diagonally.
Type of ship | Deckers | Ships |
---|---|---|
battleship | 4 | 1 |
cruiser | 3 | 2 |
destroyer | 2 | 3 |
submarine | 1 | 4 |
- Implemented with Python 2.7/3.5 (or compatible with both of them).
- Uses only python standard library.
- Respects PEP8.
- Utilizes REST as a communication mechanism.
- Uses power of OOP where it makes sense.
- Provides useful logging.
- Should be launched on Linux.
- Well documented.
- Covered by unit tests.
- Provides game statistics for all/each user (leaderboard).
- Can be installed in system as python package (setup.py and whl).
- Game statistics can be exported to csv file/stdout.
- Provides API for adding plug-ins for exporting game statistics to other formats.
- Supports multi-player model (a few games at the same time).
Note: you can implement client for web browser using JavaScript, TKinter for GUI client or curses (ncurses) for CLI fans.
Note: if you became boring with implementation of you own "web framework" you
can use any popular such as flask
, itty
, Bottle
, web2py
, falcon
, etc.
Yury Krasouski
1.1.2