Fixed up building enemies and items using componentsin the JSON.

This commit is contained in:
Zed A. Shaw 2025-01-09 14:01:40 -05:00
parent 9ce4fbd552
commit 222b39c403
13 changed files with 76 additions and 60 deletions

View file

@ -36,9 +36,6 @@ TEST_CASE("all components can work in the world", "[components]") {
auto tile = world.get<Tile>(ent1);
REQUIRE(tile.chr == "Z");
auto enemy = world.get<EnemyConfig>(ent1);
REQUIRE(enemy.HEARING_DISTANCE == 4);
}
TEST_CASE("all components can be facts", "[components]") {
@ -72,9 +69,6 @@ TEST_CASE("all components can be facts", "[components]") {
auto tile = world.get_the<Tile>();
REQUIRE(tile.chr == "Z");
auto enemy = world.get_the<EnemyConfig>();
REQUIRE(enemy.HEARING_DISTANCE == 4);
}
TEST_CASE("confirm combat works", "[components]") {

View file

@ -86,7 +86,7 @@ TEST_CASE("thrash matrix iterators", "[matrix]") {
size_t width = Random::uniform<size_t>(1, 100);
size_t height = Random::uniform<size_t>(1, 100);
Matrix test(width, matrix::Row(height));
Matrix test(height, matrix::Row(width));
random_matrix(test);
// first make a randomized matrix