While inspired by Connect Four, this game accommodates other numbers (Connect Three, Six, etc.), as well as variable board dimensions and a variable number of players.
The game logic is in Python.
Python version is listed in runtime.txt.
Package dependencies are listed in requirements.txt. To install (preferably in a new venv):
pip install -r requirements.txt
The goal of the web app was to use as many "hip" technologies as I could cram into one project:
- WebSockets, with socket.io on the client side and Flask-SocketIO on the server side
- Javascript uses:
- ES6 (aiming to follow the Airbnb style guide)
- React
- Redux
- webpack to bundle for the web
- CSS uses:
- SASS
- Flexbox layout
- Only named HTML colors (maybe not hip, but definitely artisanal)
- Python uses:
- The Flask framework
- (maybe upcoming) asyncio with Python 3
To install JS dev dependencies (listed in package.json):
npm install
If you install any new JS dev dependencies, use the --save-dev
option to list
in package.json:
npm install <package-name> --save-dev
To bundle JS and CSS for the web (configured in webpack.config.js):
webpack
To automate the above while developing:
webpack --watch
To launch the web app:
./run_web.py
The GUI view uses Python's built-in Tkinter library.
To launch:
./run_gui.py
To start the command line app (from root dir):
./run_cli.py
To run all unit tests (from root dir):
python -m unittest discover -v