Crate grid_engine

Source
Expand description

Grid Engine is a flexible and efficient library for managing 2D grid-based layouts.

This crate provides functionality for:

  • Managing items in a 2D grid with automatic collision handling
  • Dynamic vertical expansion of the grid
  • Event system for tracking grid changes
  • Strong type safety and error handling

§Example

use grid_engine::grid_engine::GridEngine;

// Create a new 10x12 grid
let mut grid = GridEngine::new(10, 12);

// Add items (automatic collision handling)
grid.add_item("box1".to_string(), 0, 0, 2, 2)?;

// Move items
grid.move_item("box1", 2, 2)?;

See the examples directory for more usage examples.

Modules§

error
grid_engine
Grid Engine manages a 2D grid system with support for adding, removing, and moving items.
node
Node representation and management for grid items.