Merge branch 'main' of github.com:mod-cpp/pacman

This commit is contained in:
Ólafur Waage 2021-09-10 11:35:24 +02:00
commit d9536b94ea
1 changed files with 1 additions and 1 deletions

View File

@ -54,7 +54,7 @@ constexpr std::array<std::array<int, COLUMNS>, ROWS> board = {{
// clang-format on
static Cell cellAtPosition(GridPosition point) {
if (point.x < 0 || point.x >= COLUMNS || point.y < 0 || point.y >= ROWS)
if (point.x >= COLUMNS || point.y >= ROWS)
return Cell::wall;
return Cell(board[point.y][point.x]);
}