Trait eos_rs::api::dungeon_mode::DungeonTileGridRead
source · pub trait DungeonTileGridRead<const W: usize, const H: usize> {
// Required methods
fn get(&self, x: usize, y: usize) -> Option<&DungeonTile>;
fn iter(&self) -> DungeonTileGridIter<'_, W> ⓘ;
}
Expand description
Functions for reading from a tile grid.
Required Methods§
sourcefn get(&self, x: usize, y: usize) -> Option<&DungeonTile>
fn get(&self, x: usize, y: usize) -> Option<&DungeonTile>
Returns the tile at the given position. Panics if the position is out of bounds.
sourcefn iter(&self) -> DungeonTileGridIter<'_, W> ⓘ
fn iter(&self) -> DungeonTileGridIter<'_, W> ⓘ
Iterate over all tiles in the grid, in row-major order (from top-left to bottom-right).