Using different example function in exercise.
This commit is contained in:
parent
38cb42ec17
commit
2179cf4053
1 changed files with 3 additions and 3 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue