pacman/exercises/21/is_intersection/README.md

454 B

< Back

Exercise:

Exercise: Create isIntersection function

  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