Update README.md

This commit is contained in:
Patricia Aas 2021-10-19 08:05:56 +02:00 committed by GitHub
parent b80c9708ca
commit a8c3d0133e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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.