Esempio n. 1
0
 private void InitializeSideToMove(FenString fenString)
 {
     this.SideToMove = fenString.SideToMove;
 }
Esempio n. 2
0
 private void InitializePieceSet(FenString fenString)
 {
     fenString.PiecePlacement.CopyTo(this.pieceSet, 0);
 }
Esempio n. 3
0
 private void InitializeEnPassantSquare(FenString fenString)
 {
     this.EnPassantSquare = fenString.EnPassantSquare;
 }
Esempio n. 4
0
 private void InitializeCastlingStatus(FenString fenString)
 {
     this.WhiteCanCastleOO = fenString.CanWhiteShortCastle;
     this.WhiteCanCastleOOO = fenString.CanWhiteLongCastle;
     this.BlackCanCastleOO = fenString.CanBlackShortCastle;
     this.BlackCanCastleOOO = fenString.CanBlackLongCastle;
 }
Esempio n. 5
0
        private void InitializeBitBoards(FenString fenString)
        {
            for (int i = 0; i < fenString.PiecePlacement.Length; i++)
            {
                if (fenString.PiecePlacement[i].Type == PieceType.King)
                    this.kingSquare[fenString.PiecePlacement[i].Color] = i;
                if (fenString.PiecePlacement[i].Color != PieceColor.None)
                    this.bitBoardSet[fenString.PiecePlacement[i].Color][fenString.PiecePlacement[i].Type] |= Constants.SquareMask[i];
            }

            this.UpdateGenericBitBoards();
        }
Esempio n. 6
0
 internal void LoadGame(FenString fenString)
 {
     this.InitializeCastlingStatus(fenString);
     this.InitializeSideToMove(fenString);
     this.InitializePieceSet(fenString);
     this.InitializeEnPassantSquare(fenString);
     this.InitializeBitBoards(fenString);
 }