Update README.md
This commit is contained in:
parent
b80c9708ca
commit
a8c3d0133e
1 changed files with 5 additions and 9 deletions
|
@ -1,13 +1,9 @@
|
||||||
[< Back](../README.md)
|
[< Back](../README.md)
|
||||||
|
|
||||||
# Exercise: Create isIntersection function
|
# Exercise:
|
||||||
|
|
||||||
## Background:
|
## Exercise: Create isIntersection function
|
||||||
|
|
||||||
waage: Maybe the "isIntersection" for the AI. Create an array of GridPosition and array of bool and loop through to
|
1. In Board.cpp create an isIntersection function that returns a bool and takes a GridPosition as a parameter
|
||||||
check "isWalkableForPacMan" and then return the different kinds of intersections (top/right, right/bottom, bottom/left,
|
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.
|
||||||
left/top)
|
3. Return true if there are at least three different walkable paths
|
||||||
|
|
||||||
## Exercise
|
|
||||||
|
|
||||||
1.
|
|
||||||
|
|
Loading…
Reference in a new issue