Assets/Scripts/BoardManager.cs
/// <summary>
/// Start() method
/// initialize some variables 
/// proceeds to spawn the Pieces 
/// and make an instance to be accessible from other scripts
/// </summary>
Start() method
initialize some variables
proceeds to spawn the Pieces
and make an instance to be accessible from other scripts
Start () method initialize some variables proceeds to spawn the Pieces and make an instance to be accessible from other scripts
private void Start()
    {
        offsetX = this.gameObject.transform.position.x;
        offsetZ = this.gameObject.transform.position.z;
        offsetY = this.gameObject.transform.position.y;
        activeChessPieceModel = new List<GameObject>();
        chessPieces = new ChessPiece[8, 8];
        EnPassantMove = new int[2] { -1, -1 };
        InitialSpawning();
        if (whitePlayer != null)
        {
            whitePlayer.OnEpisodeBegin();
        }
        if (blackPlayer != null)
        {
            blackPlayer.OnEpisodeBegin();
        }
        Instance = this;
    }
private void Start ( ) { offsetX = this . gameObject . transform . position . x ; offsetZ = this . gameObject . transform . position . z ; offsetY = this . gameObject . transform . position . y ; activeChessPieceModel = new List < GameObject > ( ) ; chessPieces = new ChessPiece [ 8 , 8 ] ; EnPassantMove = new int [ 2 ] { - 1 , - 1 } ; InitialSpawning ( ) ; if ( whitePlayer != null ) { whitePlayer . OnEpisodeBegin ( ) ; } if ( blackPlayer != null ) { blackPlayer . OnEpisodeBegin ( ) ; } Instance = this ; }
Start() method
initialize some variables
proceeds to spawn the Pieces
and make an instance to be accessible from other scripts
Start () method initialize some variables proceeds to spawn the Pieces and make an instance to be accessible from other scripts