Press space to create a cat that will reach the apple by utilizing pathfinding! You can also move the apple. Larger and more complex mazes don't work due to the tile size of the path. This code is great for simple mazes. Making the tile size smaller creates a clone limit which basically ruins a game with clones. One thing that I've noticed is that when you start the project, you can see the maze tiles for a split second, but then they go away. Also, when you create a cat, its mask appears for a split second. Is there any way to take this away?
All credit to @griffpatch for his pathfinding tutorial.