Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add boundary checks for indexing 'Map' with 'Vector2<i32>'
This commit introduces boundary checks to the index and index_mut methods of the Map struct, implementing the Index and IndexMut traits for Vector2<i32>. The checks ensure that the provided position (consisting of x and y coordinates) falls within the valid range defined by the dimensions of the Map. This enhancement prevents potential out-of-bounds access errors and improves the code's robustness.
- Loading branch information