fix movement, so the ball can not move out of the game field