This is a implementation of game Reversi (with rule-set Othello).
Reversi is a board game for two players with simple rules and deep strategy.
This client supports two types of interaction through a graphical interface or console.
- Python3
- PyGame
Clone the repository and change the working directory:
git clone https://github.com/alexandr-gnrk/reversi.git
cd reversi
Create and activate the virtual environment:
python3 -m venv ./venv
source ./venv/bin/activate
Install requirements:
pip3 install -r requirements.txt
Run the game:
python3 main.py
usage: main.py [-h] [-m {gui,console}] [-e]
Reversi game with Othello rule-set
optional arguments:
-h, --help show this help message and exit
-m {gui,console}, --mode {gui,console}
game mode
-e, --experimental enable experimental features
Run with GUI mode is enabled by default:
python3 main.py
Run with console mode:
python3 main.py -m console
Run with GUI mode and experimental features:
python3 main.py -m gui -e
Patterns that were used:
The game supports three modes:
- Player vs Player
- Player vs Bot
- Bot vs Bot (only in experimental mode)
Cheklist:
- All Othello rules implemented
- The user can choose: either go for both opponents, or play against a computer player
- The program does not allow you to make incorrect moves
- The program determines the winner
- Implemented a full game loop