Added isValidMove function and renamed areMovesValid to isValidPlay