amethyst / rustrogueliketutorial

Roguelike Tutorial in Rust - using RLTK
MIT License
905 stars 156 forks source link

Fix potential bug in Chapter 3 #147

Closed NathanYukai closed 1 year ago

NathanYukai commented 4 years ago

Check boundary correctly, the old code works in this example because there is always a wall around the edge, but if there isn't a wall, the destination_idx can go out of index.

NathanYukai commented 4 years ago

The book part also need update, let me know if you agree with this change and I'm happy to update the book as well.