Thanks for checking out my game! For the chasing AI, I created an object at each corner that Pac-Man could turn at, and when Pac-Man collided with any of the objects, he would calculate which direction would position him the closest to the nearest ghost.