diff --git a/src/map.hpp b/src/map.hpp index 953e97bb237..2fbbcc48a8b 100644 --- a/src/map.hpp +++ b/src/map.hpp @@ -164,13 +164,13 @@ public: //on the map. Should be called before indexing using [] bool on_board(const location& loc) const { - return loc.valid() && loc.x < w() && loc.y < h(); + return loc.valid(w_, h_); } //function to tell if the map is of 0 size. bool empty() const { - return w() == 0 || h() == 0; + return w_ == 0 || h_ == 0; } //function to return a list of the locations of villages on the map