Skip to content

Commit

Permalink
Fix board boundary check
Browse files Browse the repository at this point in the history
  • Loading branch information
ricksterhd123 committed Jun 22, 2023
1 parent 32312df commit 2db607e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/board.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ class Board
bool isOutOfBounds(Vector2<int> position)
{
return position.x <= margin ||
position.x >= size.x - margin ||
position.x >= size.x - (2 * margin) ||
position.y <= margin ||
position.y >= size.y - margin;
position.y >= size.y - (2 * margin);
}

void draw(Window *window)
Expand Down

0 comments on commit 2db607e

Please sign in to comment.