Skip to content

Commit

Permalink
Improve pathfind test
Browse files Browse the repository at this point in the history
For destination, start with y=map.width and decrement by 1
  • Loading branch information
jackburton79 committed Jun 1, 2024
1 parent 3ab4af0 commit 3c5b8fd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/PathFindTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,9 @@ ResetState(Path& p, Bitmap* bitmap, IE::point& start, IE::point& end)
InitializeSearchMap();

// skip non walkable points
start.y = gNumRowsMap;
do {
start.y = Core::RandomNumber(0, gNumRowsMap - 1);
start.y--;
} while (!IsWalkable(start));
end.x -= 5;
do {
Expand Down

0 comments on commit 3c5b8fd

Please sign in to comment.