Skip to content
Quagen is a Go-like game where players make simultaneous moves to control territory on a grid board
Python HTML JavaScript CSS TSQL
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github/workflows
bin/examples
src/quagen
tests
.eslintignore
.eslintrc.json
.gitignore
.prettierignore
.prettierrc
.pylintrc
LICENSE
README.md
package-lock.json
package.json
pyproject.toml
requirements-dev.txt
requirements.txt
rollup.config.js
wsgi.ini
wsgi.py

README.md

Quagen

Gameplay

Quagen is a Go-like game where players make simultaneous moves to control territory on a grid board.

You can see an in-development preview at https://quagen.io/.

You can read more about the origin of the game at https://seekely.com/funthings/quagen/.

Contributions

This is currently a personal side project, but I welcome contributions! Before embarking on any big change or contribution, I encourage opening a discussion ticket first so we can align and avoid either one of us wasting effort. When opening a pull request, ensure your code has tests and follows the code styling tools.

The repository is under the MIT license, so feel free to fork and take the project in your own direction!

Development

Build status

Quagen is built with Python (>= 3.7), NodeJS (>= 10.16), Flask, Svelte, and SQLite.

Setting up

At some point this will all be containerized, but for now...

!!! NOTE !!! Make sure you have Python 3.7 or greater and Node 10.16 or greater installed

cd quagen
 
# Python virtual environment for dependencies
virtualenv venv
source venv/bin/activate
pip install -r requirements.txt
pip install -r requirements-dev.txt
 
# Node dependencies 
npm install
 
# Init the SQL database
cd src
export PYTHONPATH=.
python quagen/db.py

Running

To develop Quagen, you need to fire up three(!!!) processes. Once all three are up and running, navigate to http://127.0.0.1:5000 to play/debug!

# Run the API server
cd quagen
source venv/bin/activate
cd src
export FLASK_APP=quagen
export FLASK_ENV=development   
flask run
 
# Run the background worker
cd quagen
source venv/bin/activate
cd src
export PYTHONPATH=.
python quagen\worker.py
 
# Continuously compiles the Javascript/Svelte code
npm run autobuild

Testing

You can run all Python tests by running the following:

cd quagen
source venv/bin/activate
export PYTHONPATH=src
python -m pytest tests -W ignore::DeprecationWarning

The JS/web code tests run by:

cd quagen
npm test

Conventions

Highly suggested to integrate the tools below into your editor of choice.

All Python code is auto-formatted using Black and further linted using Pylint:

cd quagen
source venv/bin/activate
  
# Run the python formatter
black .
 
# Run python linter
pylint_runner -v

All JS/web code is auto-formatted using Prettier and further linted using ESlint

# Run web formatter
npm run format
 
# Run web linter
npm run lint 
You can’t perform that action at this time.