This is a Checkers Game implementation as the solution to the Qulture Rocks's challenge selection process
- python
- numpy (python library)
- pygame (python library)
python3 -m pip install -U pygame --user
python3 main.py
The game screen should apear with the pieces already arranged and ready to play.
python3 tests.py
You should see a few automated test cases run through a screen. If everything is correct, no error messages will apear.
The game rules can be found at https://pt.wikipedia.org/wiki/Damas
- This game implementation uses a desktop interface.
- To move a piece, you can either dragg it from its tile to the one you desire, or click on top of it and then on the desired tile.
- Once a piece is selected, the game will light up all the legal moves you can make. If no tile did light up, then the piece has no legal moves.
- Messages such as who has the turn and who won the game (WHITE or BLACK) will be presented via terminal.
- The game makes use of OPP, and each class is responsable for a different set of game functions.
- The game makes use of a game state machine, making its comprehension and expantion a lot easier.
- The GameWrapper object has a Checker object, which has a Board object, which has a list of Piece objects.
- Each object's function is explained with more depth in their respective file.
- Due to time restrictions, only a few test cases were implemented.
- With more time, implementations such as a "play again" button and a more complete unit test would have been implemented.
- No "how to make a checkers game" tutorial were used during the development of the codes.
https://www.pygame.org/wiki/GettingStarted#Pygame%20Installation