viva_aion/grid
Grid - 2D spatial structure
The fabric of reality. A discrete 2D space where consciousness can exist and move.
Types
Values
pub fn find_all(
grid: Grid,
target: tile.Tile,
) -> List(position.Position)
Get all positions of a specific tile type
pub fn is_core(grid: Grid, pos: position.Position) -> Bool
Check if position is the core
pub fn is_passable(grid: Grid, pos: position.Position) -> Bool
Check if position is passable
pub fn passable_neighbors(
grid: Grid,
pos: position.Position,
) -> List(position.Position)
Get passable neighbors
pub fn passable_positions(grid: Grid) -> List(position.Position)
Get all passable positions
pub fn set(
grid: Grid,
pos: position.Position,
t: tile.Tile,
) -> Grid
Set tile at position
pub fn to_string_with_marker(
grid: Grid,
marker_pos: position.Position,
) -> String
Convert grid to string with position marker