A personal implementation
This is a personal implementation of the connect 4 game. This is made in Python3 and played in the terminal.
To run this you'll need Python3 installed and the dependencies in requirements.txt
.
You can install those globally by typing pip install -r requirements.txt
, but I would suggest creating a virtual environment for this project using venv.
To create a virtual environment en install the dependencies type:
python3 -m venv .
source bin/activate
pip install -r requirements.txt
This will create a venv in the current directory, activate it and install the dependencies.
You can also manage the dependencies using conda.
conda env create -f environment.yml
This will create and activate the environment.
To run the game type
python -m connect4
or run
python -m connect4 -h
to see extra options.
To play game simply type the number of the column you want the put the disc in and press enter.
Different playstyles of this game:
- Play locally against another player
- Play locally against a bot
- Play online against another player
Playing online hasn't been fully tested and may run into some problems with NAT. If you want to test it and maybe solve this, please do.
The code in this project is licensed under The Unlicense.