Short Circuit is a tile-based digital logic sandbox inspired by Wireworld and Minecraft's Redstone.
It is in pre-alpha. Expect nothing to work!

To load the demo full adder file:
./docker-build.sh
./docker-run.sh
# View the help
python ./shortcircuit/main.py --help
# Load the demo - Press "o" over switches to toggle
# Press "." to advance the simulation
python ./shortcircuit/main.py --file data/full-adder.ssboard
Controls
Tests are written with the unittest module from the
Standard Python Library.
To run tests, you can simply run the test file that you are interested in:
export PYTHONPATH=${PYTHONPATH}:./shortcircuit
python3 ./shortcircuit/test/FILE_HERE.py
Or you can use pytest to call them all at once:
export PYTHONPATH=${PYTHONPATH}:./shortcircuit
pip install pytest
pytest ./shortcircuit/test/*
Here's how I develop short-circuit if you would like to jump in and help!
I prefer to do my development with docker images, you may find it easier to just use a python venv. If you choose to use docker, there are two convenience scripts in the repo to help get set up quickly.
docker-build.sh : Builds the docker image with all the dependencies.docker-run.sh : Runs the docker image and mounts the source directory.My workflow
tail -F ./output/gameplay.log in another terminal to view logsflake8 ./shortcircuitpytest ./shortcircuit/tests/*python ./shortcircuit/main.pyBecause the source directory is mounted, it's possible to quickly hack on source without having to rebuild everything.
If you like this project, you'll probably like these things too.
Content type
Image
Digest
Size
36.8 MB
Last updated
over 5 years ago
docker pull amfl/short-circuit