File size: 295 Bytes
d5c39db
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
use crate::grid::GridPosition;



pub fn is_within_boundaries(grid_position: &GridPosition, res_x: i32, res_y: i32) -> bool {
    grid_position.current_x >= 1
        && grid_position.current_x < res_x - 1
        && grid_position.current_y >= 0
        && grid_position.current_y < res_y - 1
}