Trifecta is a three game compilation created as a part of acadamic project.
Trifecta is a fun python project consisting of three games namely :
- Chess
- Rock-Paper-Scissors (RPS)
- Whack-A-Mole (WAM)
The pygame
python library has been used as the backbone for building each of them. Each game is aided with background music making the experience better!
Simply run the MAINMENU.py file and you are good to go. However, you will have to install the following dependencies prior to that:
- pygame - Pygame is a Python wrapper module for the SDL multimedia library. It contains python functions and classes that will allow you to use SDL’s support for playing cdroms, audio and video output, and keyboard, mouse and joystick input
- python-chess - python-chess is a pure Python chess library with move generation, move validation and support for common formats.
- pyperclip - Pyperclip is a cross-platform Python module for copy and paste clipboard functions. It works with Python 2 and 3.
This is essentially a two player chess game. The pieces can be moved by dragging them around.The chess games are evaluated on the basis of FIDE rules of chess. At the end of the game, the pgn file of the entire chess game is stored in the ./ChessResources/pgn/ directory. This can be used to analyze your game in the future! Also note that the FEN of the current position will be automatically copied to your clipboard which can be used to analyze the position.
RPS is a single player classic Rock Paper Scissors game against the computer. The controls for this game are keyboard based. The computer's moves are completely random. First to 5 points wins!
WAM is also a single player classic Whack A Mole game against the computer. You gotta simply click on the mole as soon as you can, once it pops up. The game speeds up eventually and your reflexes will come into play!
The Trifecta repository is licensed under MIT License.