keep it away from the edge in the game, the sprite constantly changes direction and goes toward the edge. By using the arrow keys, you can counter that action
I made this over break