private void AiMove(int player, int depth) { if (Input.anyKeyDown) { var aiMove = _ai.GetAiMove(depth, player); _b.PlaceMove(aiMove, player); _b.DisplayBoard(); var gameResult = _ai.GameResult(_b); switch (gameResult) { case 1: Player1Win(); break; case 2: Player2Win(); break; case 0: Draw(); break; } _firstPlayerTurn = !_firstPlayerTurn; } }
public void HumanMove(int move, int player) { _b.PlaceMove(move - 1, player); }