aboutsummaryrefslogtreecommitdiff
path: root/src/tiling.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/tiling.rs')
-rw-r--r--src/tiling.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/tiling.rs b/src/tiling.rs
index bc1bd50..3bad119 100644
--- a/src/tiling.rs
+++ b/src/tiling.rs
@@ -36,6 +36,10 @@ impl<'a> TileGrid {
pub fn raw_data(&'a self) -> &'a Vec<Vec<TileType>> {
&self.grid
}
+
+ pub fn get_block_at(&self, x: usize, y: usize) -> &TileType {
+ &self.grid[y + 1][x]
+ }
}
pub fn tile_to_str(tile: &TileType) -> &str {