More cleanups of the tests and fixes to the room and door positioning.

This commit is contained in:
Zed A. Shaw 2026-03-15 22:53:00 -04:00
parent 8e2a691337
commit 02d23bb77d
11 changed files with 75 additions and 78 deletions

View file

@ -65,18 +65,17 @@ TEST_CASE("battle operations fantasy", "[combat-battle]") {
while(auto act = battle.next()) {
auto& [enemy, wants_to, cost, enemy_state] = *act;
fmt::println(">>>>> entity: {} wants to {} cost={}; has {} HP; {} ap",
enemy.entity, wants_to,
cost, enemy.combat->hp,
enemy.combat->ap);
// fmt::println(">>>>> entity: {} wants to {} cost={}; has {} HP; {} ap",
// enemy.entity, wants_to,
// cost, enemy.combat->hp,
// enemy.combat->ap);
switch(enemy_state) {
case BattleHostState::agree:
fmt::println("HOST and PLAYER requests match {}, doing it.",
wants_to);
// fmt::println("HOST and PLAYER requests match {}, doing it.", wants_to);
break;
case BattleHostState::disagree:
fmt::println("REBELIOUS ACT: {}", wants_to);
// fmt::println("REBELIOUS ACT: {}", wants_to);
battle.clear_requests();
REQUIRE(battle.$player_requests.size() == 0);
break;
@ -86,7 +85,7 @@ TEST_CASE("battle operations fantasy", "[combat-battle]") {
}
break;
case BattleHostState::out_of_ap:
fmt::println("ENEMY OUT OF AP");
// fmt::println("ENEMY OUT OF AP");
break;
}
}

View file

@ -25,7 +25,7 @@ TEST_CASE("camera control", "[map]") {
Point center = map.center_camera({10,10}, 5, 5);
map.dump(center.x, center.y);
// map.dump(center.x, center.y);
REQUIRE(center.x == 8);
REQUIRE(center.y == 8);

View file

@ -7,7 +7,7 @@
#include "algos/maze.hpp"
#include "algos/stats.hpp"
#define DUMP 1
#define DUMP 0
using std::string;
using matrix::Matrix;