Add in the tests from finding the bug in spatial map.
This commit is contained in:
parent
569d04725a
commit
b193bab148
2 changed files with 5 additions and 2 deletions
|
@ -131,7 +131,11 @@ TEST_CASE("check all diagonal works", "[collision]") {
|
|||
|
||||
// move the enemy to a new spot around the player
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue