Use the arrow keys to control Scratch Cat! Try to avoid the crab (just as a fun addition, not the goal of the game)
Just a test of using variables to change the positions of the player. Also using variables to change the position of the enemy relative to the position of the player (distanceX = enemyX - playerX) and (distanceY = enemyY - playerY). Feel free to use any of the code for your games or feel free to remix and play with the code to understand it better! PS: If you want to check the distance of an sprite and another sprite, ALWAYS do thisSprite'sPosition - otherSprite'sPosition (not using the exact same variables), and not the other way around. I learned that the hard way and got my crab moving AWAY from the player, not TOWARDS the player!