Our hero can walk around the world and won't go through walls.

This commit is contained in:
Zed A. Shaw 2024-09-30 00:04:58 -04:00
parent bcc524861e
commit 2e8abbaf5e
3 changed files with 49 additions and 25 deletions

View file

@ -59,11 +59,15 @@ public:
int limit() { return m_limit; }
size_t width() { return m_walls[0].size(); }
size_t height() { return m_walls.size(); }
Room &room(size_t at) {
return m_rooms[at];
}
void make_room(size_t origin_y, size_t origin_x, size_t width, size_t height);
void add_door(Room &room);
bool inmap(size_t x, size_t y);
bool iswall(size_t x, size_t y);
bool neighbors(Point &out, bool up);
void generate();
void place_rooms(Room &root);