Add in the tests from finding the bug in spatial map.

This commit is contained in:
Zed A. Shaw 2025-07-31 00:03:36 -04:00
parent 569d04725a
commit b193bab148
2 changed files with 5 additions and 2 deletions

View file

@ -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;
}
}