diff --git a/tests/map.cpp b/tests/map.cpp index c807c49..4c76de5 100644 --- a/tests/map.cpp +++ b/tests/map.cpp @@ -6,7 +6,6 @@ #include "levelmanager.hpp" #include "systems.hpp" - using namespace fmt; using namespace nlohmann; using std::string; diff --git a/tests/spatialmap.cpp b/tests/spatialmap.cpp index 04d018a..ee00d9e 100644 --- a/tests/spatialmap.cpp +++ b/tests/spatialmap.cpp @@ -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; } }