private void checkForAiRound() { var winner = GetWinner(); if (winner == Symbol.None) { if (AiPlayers.Contains(_currentPlayer)) { if (MinMax.DoMinMax(this, _currentPlayer, out var bestPlay)) { MakePlay(bestPlay.Line, bestPlay.Column); } else { Debug.Log("No available plays"); } } } }
private void CheckForAiRound() { var winner = GetWinner(); if (winner == Simbolos.N) { if (AiPlayers.Contains(_jogadorAtual)) { //hard if (level == Difficult.hard) { if (MinMax.DoMinMax(this, _jogadorAtual, out var bestPlay)) { MakePlay(bestPlay.Line, bestPlay.Column); } else { setStatus(statusGame = 3); } } //easy if (level == Difficult.easy) { modoEasy(); } //normal if (level == Difficult.normal) { modoNormal = Random.Range(0, 10); if ((modoNormal >= 2) && MinMax.DoMinMax(this, _jogadorAtual, out var bestPlay)) { MakePlay(bestPlay.Line, bestPlay.Column); } else if (modoNormal <= 1) { modoEasy(); } } } } }