[go: up one dir, main page]

Skip to content

OfflineBrain/khexagon

Repository files navigation

KHexagon Library

Maven Central Version

Overview

KHexagon is a Kotlin library designed to assist with the mathematical manipulation and geometric visualization of hexagonal grids. Whether you're developing a board game or a hexagonal tile-based simulation, KHexagon provides a foundational toolset to streamline the grid calculation and representation processes.

The library offers comprehensive functionality for operations in a hexagonal grid context including, but not limited to:

  • Generating lines and shapes like circles or rings on a hexagonal grid.
  • Calculating distances between points.
  • Providing support for different types of hexagonal layouts (like pointy-top, flat-top, offset, and doubled grids).

Add dependency to your project

Gradle

dependencies {
    implementation("io.github.offlinebrain:khexagon:$khexagonVersion")
}

Maven

<dependency>
    <groupId>io.github.offlinebrain</groupId>
    <artifactId>khexagon</artifactId>
    <version>${khexagon.version}</version>
</dependency>