pacman/exercises/21/is_intersection/README.md

10 lines
454 B
Markdown
Raw Permalink Normal View History

2021-10-05 11:48:15 +00:00
[< Back](../README.md)
2021-10-05 11:44:51 +00:00
2021-10-19 06:05:56 +00:00
# Exercise:
2021-10-19 06:05:56 +00:00
## Exercise: Create isIntersection function
2021-10-05 12:29:27 +00:00
2021-10-19 06:05:56 +00:00
1. In Board.cpp create an isIntersection function that returns a bool and takes a GridPosition as a parameter
2. Create an array of GridPositions around the parameter pos and array of bool and then loop through the postitions and check "isWalkableForPacMan" and store the results in the array of bools.
3. Return true if there are at least three different walkable paths