A library that makes working with a hexagonal lattice easier. Some of the inspiration for this library comes from http://www.redblobgames.com/grids/hexagons/.
pip install hexy
We'll use the HexyExamples repo to demonstrate
hexy
.
git clone https://github.com/redft/hexyexamples
cd hexyexamples
pip install -r requirements.txt # If you're not using a virtual environment, you might need to use sudo.
python2 example.py
The example app just shows off some features of the library. To play around you can:
- right click to change the hex selection type.
- scroll up and down to change the radius of selection when selection type is ring or disk.
- left click to change the starting point of the line when selection type is a line.
If you're working on setup.py
and want to check it's configured properly, you can run:
pip install -e .
If you're working on the tests and want to install the test dependencies:
pip install -e .[tests]
If you're using zsh
you'll have to use quotes in your command:
pip install -e ".[tests]"
From the project's root directory, run:
python -m pytest
This project is licensed under the MIT License - see the LICENSE.md file for details