More cleanup of the raycaster, finally removed the window as a dependency but I went against making it an sf::Drawable since that had a lot of code quality problems.
This commit is contained in:
parent
d6c09e111d
commit
d0badedbd9
5 changed files with 25 additions and 74 deletions
|
@ -154,10 +154,10 @@ TEST_CASE("confirm can iterate through all", "[spatialmap-sort]") {
|
|||
|
||||
auto sprite_distance = collider.distance_sorted(player);
|
||||
|
||||
int prev_dist = 0;
|
||||
int prev_dist = sprite_distance[0].first;
|
||||
|
||||
for(auto dist : sprite_distance) {
|
||||
REQUIRE(prev_dist <= dist.first);
|
||||
REQUIRE(prev_dist >= dist.first);
|
||||
prev_dist = dist.first;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue