#include <catch2/catch_test_macros.hpp>
#include <fmt/core.h>
#include "gui.hpp"
#include "map.hpp"
#include "dinkyecs.hpp"
#include "worldbuilder.hpp"
#include "save.hpp"
#include "systems.hpp"
#include "spatialmap.hpp"
#include "components.hpp"

using namespace fmt;
using namespace components;
using std::string;

TEST_CASE("load a basic gui run but don't loop", "[gui]") {
  DinkyECS::World world;
  save::load_configs(world);
  Map game_map(40, 40);
  WorldBuilder builder(game_map);
  builder.generate(world);

  SpatialMap collider;
  world.set_the<SpatialMap>(collider);
  System::init_positions(world);

  GUI gui(world, game_map);
  gui.main(true); // runs once
}
