Spaces:
Running
Running
Download rust/src/utils/boundaries.rs from allnewthunder/rust-sandbox: direct link, hf CLI and curl.
- Browser
- Download file 295 Bytes
-
https://huggingface.co/spaces/allnewthunder/rust-sandbox/resolve/main/rust/src/utils/boundaries.rs
- Command line
-
hf download hf://spaces/allnewthunder/rust-sandbox/rust/src/utils/boundaries.rs
-
curl -L -o boundaries.rs https://huggingface.co/spaces/allnewthunder/rust-sandbox/resolve/main/rust/src/utils/boundaries.rs
295 Bytes
| 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 | |
| } | |