Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/RedFT/Hexy
Hexagonal Coordinate System Library for Python
https://github.com/RedFT/Hexy
Last synced: 5 days ago
JSON representation
Hexagonal Coordinate System Library for Python
- Host: GitHub
- URL: https://github.com/RedFT/Hexy
- Owner: RedFT
- License: mit
- Created: 2017-07-08T00:36:58.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-02-11T14:30:03.000Z (over 1 year ago)
- Last Synced: 2024-09-16T01:54:44.229Z (about 2 months ago)
- Language: Python
- Size: 212 KB
- Stars: 87
- Watchers: 4
- Forks: 17
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
- awesome-starred - RedFT/Hexy - Hexagonal Coordinate System Library for Python (others)
README
[![Build Status](https://travis-ci.org/RedFT/Hexy.svg?branch=master)](https://travis-ci.org/RedFT/Hexy)
# Hexy, A library for dealing with hexagonal coordinate systems.
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/](http://www.redblobgames.com/grids/hexagons/).
![Alt text](/Hexy.gif?raw=true "Short Demo")
## Getting Started
### Installing via pip
```bash
pip install hexy
```## Running the example
We'll use the [HexyExamples](https://github.com/redft/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.
```## For developers
If you're working on `setup.py` and want to check it's configured properly, you can run:
```bash
pip install -e .
```#### Developing Tests
If you're working on the tests and want to install the test dependencies:
```bash
pip install -e .[tests]
```If you're using `zsh` you'll have to use quotes in your command:
```zsh
pip install -e ".[tests]"
```#### Testing
From the project's root directory, run:
```bash
python -m pytest
```## License
This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details