|
|
@ -131,7 +131,11 @@ TEST_CASE("check all diagonal works", "[collision]") { |
|
|
|
|
|
|
|
|
|
|
|
// move the enemy to a new spot around the player
|
|
|
|
// move the enemy to a new spot around the player
|
|
|
|
Point move_to = {enemy_at.x + x, enemy_at.y + y}; |
|
|
|
Point move_to = {enemy_at.x + x, enemy_at.y + y}; |
|
|
|
collider.move(enemy_at, move_to, enemy); |
|
|
|
|
|
|
|
|
|
|
|
if(!collider.occupied(move_to)) { |
|
|
|
|
|
|
|
collider.move(enemy_at, move_to, enemy); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
enemy_at = move_to; |
|
|
|
enemy_at = move_to; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|