Assets/Scripts/BoardManager.cs
/// <summary>
/// Proceeds to reset some vars and delets pieces once again if needed to (need for the training)
/// remove highlights that may exist on the floor
/// and spawn the pieces again for a new game
/// </summary>
Proceeds to reset some vars and delets pieces once again if needed to (need for the training)
remove highlights that may exist on the floor
and spawn the pieces again for a new game
Proceeds to reset some vars and delets pieces once again if needed to ( need for the training ) remove highlights that may exist on the floor and spawn the pieces again for a new game
public void ResetGame()
    {
        endEpisodes();
        isWhiteTurn = true;    
        didWhiteRook0EverMoved = false;
        didWhiteRook1EverMoved = false;
        didWhiteKingEverMoved = false;
        didBlackRook0EverMoved = false;
        didBlackRook1EverMoved = false; 
        didBlackKingEverMoved = false;
        HighligthsManager.Instance.RemoveHighlights(); 
        foreach (GameObject go in activeChessPieceModel)
        {
            Destroy(go);
        }
        InitialSpawning();
        if (whitePlayer != null)
        {
            whitePlayer.OnEpisodeBegin();
        }
        if (blackPlayer != null)
        {
            blackPlayer.OnEpisodeBegin();
        }
    }
public void ResetGame ( ) { endEpisodes ( ) ; isWhiteTurn = true ; didWhiteRook0EverMoved = false ; didWhiteRook1EverMoved = false ; didWhiteKingEverMoved = false ; didBlackRook0EverMoved = false ; didBlackRook1EverMoved = false ; didBlackKingEverMoved = false ; HighligthsManager . Instance . RemoveHighlights ( ) ; foreach ( GameObject go in activeChessPieceModel ) { Destroy ( go ) ; } InitialSpawning ( ) ; if ( whitePlayer != null ) { whitePlayer . OnEpisodeBegin ( ) ; } if ( blackPlayer != null ) { blackPlayer . OnEpisodeBegin ( ) ; } }
Proceeds to reset some vars and delets pieces once again if needed to (need for the training)
remove highlights that may exist on the floor
and spawn the pieces again for a new game
Proceeds to reset some vars and delets pieces once again if needed to ( need for the training ) remove highlights that may exist on the floor and spawn the pieces again for a new game
//reset vars