private void InitializeSideToMove(FenString fenString) { this.SideToMove = fenString.SideToMove; }
private void InitializePieceSet(FenString fenString) { fenString.PiecePlacement.CopyTo(this.pieceSet, 0); }
private void InitializeEnPassantSquare(FenString fenString) { this.EnPassantSquare = fenString.EnPassantSquare; }
private void InitializeCastlingStatus(FenString fenString) { this.WhiteCanCastleOO = fenString.CanWhiteShortCastle; this.WhiteCanCastleOOO = fenString.CanWhiteLongCastle; this.BlackCanCastleOO = fenString.CanBlackShortCastle; this.BlackCanCastleOOO = fenString.CanBlackLongCastle; }
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(); }
internal void LoadGame(FenString fenString) { this.InitializeCastlingStatus(fenString); this.InitializeSideToMove(fenString); this.InitializePieceSet(fenString); this.InitializeEnPassantSquare(fenString); this.InitializeBitBoards(fenString); }