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

master
Zed A. Shaw 5 days ago
parent 569d04725a
commit b193bab148
  1. 1
      tests/map.cpp
  2. 4
      tests/spatialmap.cpp

@ -6,7 +6,6 @@
#include "levelmanager.hpp" #include "levelmanager.hpp"
#include "systems.hpp" #include "systems.hpp"
using namespace fmt; using namespace fmt;
using namespace nlohmann; using namespace nlohmann;
using std::string; using std::string;

@ -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};
if(!collider.occupied(move_to)) {
collider.move(enemy_at, move_to, enemy); collider.move(enemy_at, move_to, enemy);
}
enemy_at = move_to; enemy_at = move_to;
} }
} }

Loading…
Cancel
Save