lettuces 0.0.7

A grid logic crate combining Hexx and custom logic for square and isometric grids to provide a unified grid logic crate.
Documentation
use hexx::{Hex, OffsetHexMode};

use super::Cell;

impl From<Hex> for Cell {
    fn from(value: Hex) -> Self {
        Cell::new(value.x, value.y)
    }
}

impl From<Cell> for Hex {
    fn from(value: Cell) -> Self {
        Hex::new(value.x, value.y)
    }
}

impl Cell {
    /// Converts offset coordinates into axial coordinates with the given mode.
    pub fn from_offset_coordinates(coords: [i32; 2], mode: OffsetHexMode) -> Cell {
        Hex::from_offset_coordinates(coords, mode).into()
    }
}