Hopson97 / Asciimon

Pokemon-inspired game created using Rust for terminals which support ANSI escape commands.
124 stars 11 forks source link

Checking if next player position is in bounds #35

Closed sorokya closed 6 years ago

sorokya commented 6 years ago

I just noticed when playing around with the game that it would panic if the X/Y was outside the bounds of the Vec. Copied the get_tile functions to validate the next position was in bounds before attempting to move to it.

I'm pretty new to rust and open source in general, so let me know what you think

sorokya commented 6 years ago

Sorry, just found the related issue about this, I'll close the pull request :)