Hexlab
Hexlab is a Rust library for generating and manipulating hexagonal mazes.
Features
- Create hexagonal mazes of configurable size
- Customizable maze properties (radius, start position, seed)
- Efficient bit-flag representation of walls for optimized memory usage
- Multiple maze generation algorithms (WIP)
- Maze builder pattern for easy and flexible maze creation
Installation
Add hexlab
as a dependency:
Getting Started
use *;
Usage
use *;
// Create a new maze
let maze = new
.with_radius
.build
.expect;
// Get a specific tile
let tile = maze.get_tile.unwrap;
// Check if a wall exists
let has_wall = tile.walls.contains;
Documentation
Full documentation is available at docs.rs.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Acknowledgements
Hexlab relies on the excellent hexx library for handling hexagonal grid mathematics, coordinates, and related operations. We're grateful for the robust foundation it provides for working with hexagonal grids.
License
This project is dual-licensed under either:
- MIT License (LICENSE-MIT or http://opensource.org/licenses/MIT)
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
at your option.