Using different example function in exercise.

This commit is contained in:
Ólafur Waage 2021-09-29 14:18:06 +02:00
parent 38cb42ec17
commit 2179cf4053

View file

@ -14,11 +14,11 @@ Below the board are the helper functions. Some of them are static (only visible
```cpp ```cpp
// Board.hpp // Board.hpp
bool isInPen(GridPosition point); bool isWalkableForPacMan(GridPosition point);
// Board.cpp // Board.cpp
bool isInPen(GridPosition point) { bool isWalkableForPacMan(GridPosition point) {
return cellAtPosition(point) == Cell::pen; return cellAtPosition(point) != Cell::wall && cellAtPosition(point) != Cell::pen;
} }
``` ```