grids Crate

This crate provides a simple and flexible 2D grid data structure mainly intended for grid based games.

If you need a matrix this is not the right crate.

Features

Example Usage

Here's a simple example showcasing the usage of the crate:

```rust let mut grid = Grid::new(3, 2, 0); // A 3x2 grid filled with zeros. grid[(0, 1)] = 5;

// Accessing using glam::IVec2. asserteq!(grid[glam::IVec2::new(1, 0)], 0); // Accessing using glam::UVec2. asserteq!(grid[glam::UVec2::new(0, 1)], 5);

// Converting grid to a Vec. asserteq!( grid.intoiter_values().collect::>(), vec![0, 0, 0, 5, 0, 0] ); ```