Fixed syntax errors in findValidMoves and checkWin()