des/ndctt2021 #1

Merged
des merged 10 commits from des/ndctt2021 into main 2021-10-20 08:00:22 +00:00
Showing only changes of commit dde8996131 - Show all commits

View file

@ -65,4 +65,15 @@ TEST_CASE("Teleport", "[board]") {
const pacman::GridPosition result = pacman::teleport(portalLeft);
REQUIRE(result.x == portalRight.x);
}
}
}
TEST_CASE("Is wall", "[board]") {
REQUIRE(pacman::isWall(pacman::GridPosition{ 0, 0 }));
REQUIRE(pacman::isWall(pacman::GridPosition{ 27, 30 }));
REQUIRE(!pacman::isWall(pacman::GridPosition{ 1, 1 }));
REQUIRE(!pacman::isWall(pacman::GridPosition{ 26, 29 }));
REQUIRE(!pacman::isWall(pacman::GridPosition{ 0, 14 }));
REQUIRE(!pacman::isWall(pacman::GridPosition{ 27, 14 }));
REQUIRE(!pacman::isWall(pacman::GridPosition{ 11, 13 }));
REQUIRE(!pacman::isWall(pacman::GridPosition{ 16, 15 }));
}