rustyscreeps / screeps-starter-rust

Starter Rust AI for Screeps, the JavaScript-based MMO game
MIT License
121 stars 47 forks source link

Fixed some overly nested control blocks, added Entry API usage. #30

Closed khoover closed 1 year ago

khoover commented 1 year ago

Some of those big nested control blocks could be simplified with match arm guards and if let. Also replaced .remove()/.insert() with the .entry() API for HashMaps, hopefully it avoids a bunch of "remove X then insert X back" repetitions.