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
1 changed files with 3 additions and 3 deletions

View File

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