Use e to spawn cat to make their way to the apple. click anywhere on the map but the walls to move the apple.
THIS IS EASILY BACKBACKABLE FOR OTHER PROJECTS. This is an upgraded version of griffpatch's pathfinding. I will admit that there is a bit lag when you have multiple cats and then moving the apple