LEL can now do hit detection on squares.
This commit is contained in:
parent
aa149b6574
commit
7f9e200abe
4 changed files with 22 additions and 1 deletions
|
@ -35,4 +35,11 @@ TEST_CASE("test basic ops", "[lel]") {
|
|||
REQUIRE(cell.row < parser.rows);
|
||||
REQUIRE(cell.col < parser.columns);
|
||||
}
|
||||
|
||||
auto hit = parser.hit(250, 250);
|
||||
REQUIRE(*hit == "people");
|
||||
|
||||
auto nohit = parser.hit(1000, 1000);
|
||||
REQUIRE(!nohit);
|
||||
REQUIRE(nohit == std::nullopt);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue