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§

source

fn get(&self, x: usize, y: usize) -> Option<&DungeonTile>

Returns the tile at the given position. Panics if the position is out of bounds.

source

fn iter(&self) -> DungeonTileGridIter<'_, W>

Iterate over all tiles in the grid, in row-major order (from top-left to bottom-right).

Implementors§

source§

impl<'a, const W: usize, const H: usize> DungeonTileGridRead<W, H> for DungeonTileGridMut<'a, W, H>

source§

impl<'a, const W: usize, const H: usize> DungeonTileGridRead<W, H> for DungeonTileGridRef<'a, W, H>