Skip to content

Latest commit

 

History

History
47 lines (38 loc) · 1.42 KB

README.md

File metadata and controls

47 lines (38 loc) · 1.42 KB

Hexameter

Hexameter is a hexagonal grid library. The motivation behind it is to have an optimized, simple and usable library for drawing hexagonal grids without being tied to any GUI framework. So it works on Android, SWT, Swing, you name it! It is 100% unit tested so you don't have to worry about something going wrong.

I'm open to suggestions, feel free to comment or to send me a message. Pull reqeusts are also welcome!

Possible grid layouts:

  • Hexagonal
  • Triangular
  • Rectangular
  • Trapezoid
  • Custom

Supported operations

  • Getting a hexagon by its grid coordinate
  • Getting a hexagon by its pixel coordinate
  • Getting the neighbors of a hexagon
  • Calculating the distance between two hexagons
  • Calculating the movement range from a hexagon
  • Pathfinding with obstacles

Miscallaneous operations

  • Adding/removing a Hexagon from the grid
  • Checking whether a Hexagon is on a grid or not
  • Supplying a custom storage object
  • Adding custom data to a Hexagon
  • Clearing all custom data from the HexagonalGrid
  • Getting a subset of Hexagons from the grid

Roadmap:

  • Field of view calculation with obstacles
  • Movement range with obstacles
  • Swing JPanel extension component

License

Hexameter is made available under the MIT License.

Credits

Thanks to Adam Arold for the big work Thanks to user georgeek This version by Daniele Brambilla