added a function to valid move when only the ball position has changed