Maze works well now and there's something placed in all rooms and dead ends. Will need to randomize it more so not every dead end is an enemy.
This commit is contained in:
parent
a0b785cb2a
commit
ac252bf09d
7 changed files with 48 additions and 77 deletions
2
maze.cpp
2
maze.cpp
|
@ -28,7 +28,6 @@ inline bool complete(Matrix& maze) {
|
|||
}
|
||||
}
|
||||
|
||||
// dbc::sentinel("LOL it's complete eh?");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -136,6 +135,7 @@ void maze::hunt_and_kill(Matrix& maze, std::vector<Room>& rooms, std::vector<Poi
|
|||
for(auto& room : rooms) {
|
||||
Point room_ul{room.x - room.width - 1, room.y - room.height - 1};
|
||||
Point room_lr{room.x + room.width - 1, room.y + room.height - 1};
|
||||
|
||||
if(at.x >= room_ul.x && at.y >= room_ul.y &&
|
||||
at.x <= room_lr.x && at.y <= room_lr.y)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue