adding movingPlayer param to isValidMove