Assets/Scripts/BoardManager.cs
/// <summary>
/// Destroy pieces
/// if a Human if is playing, it will reset the board in order to play
/// Otherwise, the AI when simulating, will restart on their own (at least when training)
/// </summary>
Destroy pieces
if a Human if is playing, it will reset the board in order to play
Otherwise, the AI when simulating, will restart on their own (at least when training)
Destroy pieces if a Human if is playing it will reset the board in order to play Otherwise the AI when simulating will restart on their own ( at least when training )
public void FinishGame(bool tooMuchTime)
    {
        if (!tooMuchTime)
        {
            if (isWhiteTurn)
            {
                Debug.Log("White Win");
                if(blackPlayer != null)
                {
                    blackPlayer.AddReward(blackPlayer.lostGame);
                }
            }
            else 
            {
                Debug.Log("Black Win");
                if (whitePlayer != null)
                {
                    whitePlayer.AddReward(whitePlayer.lostGame);
                }
            }
        }
        else
        {
            if (isWhiteTurn)
            {
                Debug.Log("Black Win");
                if (whitePlayer != null)
                {
                    whitePlayer.AddReward(whitePlayer.lostGame);
                }
            }
            else
            { 
                Debug.Log("White Win");
                if (blackPlayer != null)
                {
                    blackPlayer.AddReward(blackPlayer.lostGame);
                }
            }
        }
        ResetGame();
    }
public void FinishGame ( bool tooMuchTime ) { if ( ! tooMuchTime ) { if ( isWhiteTurn ) { Debug . Log ( " " ) ; if ( blackPlayer != null ) { blackPlayer . AddReward ( blackPlayer . lostGame ) ; } } else { Debug . Log ( " " ) ; if ( whitePlayer != null ) { whitePlayer . AddReward ( whitePlayer . lostGame ) ; } } } else { if ( isWhiteTurn ) { Debug . Log ( " " ) ; if ( whitePlayer != null ) { whitePlayer . AddReward ( whitePlayer . lostGame ) ; } } else { Debug . Log ( " " ) ; if ( blackPlayer != null ) { blackPlayer . AddReward ( blackPlayer . lostGame ) ; } } } ResetGame ( ) ; }
Destroy pieces
if a Human if is playing, it will reset the board in order to play
Otherwise, the AI when simulating, will restart on their own (at least when training)
Destroy pieces if a Human if is playing it will reset the board in order to play Otherwise the AI when simulating will restart on their own ( at least when training )
//white win //black win //black win //white win
tooMuchTime
bool