private static void sacrificeQueenDebugStuffSomethingTestMethod() { //Winboard winboard = new Winboard(); ChessBoard lolBoard = new ChessBoard(); lolBoard.InitializeGame(); //White PawnBitBoard pawnWhite = new PawnBitBoard(ChessPieceColors.White); pawnWhite.Bits = BoardSquare.A4 | BoardSquare.C2 | BoardSquare.D3 | BoardSquare.E4 | BoardSquare.F2 | BoardSquare.G2; BishopBitBoard bishopWhite = new BishopBitBoard(ChessPieceColors.White); bishopWhite.Bits = BoardSquare.E2 | BoardSquare.H4; KingBitBoard kingWhite = new KingBitBoard(ChessPieceColors.White); kingWhite.Bits = BoardSquare.E1; RookBitBoard rookWhite = new RookBitBoard(ChessPieceColors.White); rookWhite.Bits = BoardSquare.B1 | BoardSquare.H1; KnightBitBoard knightWhite = new KnightBitBoard(ChessPieceColors.White); knightWhite.Bits = BoardSquare.D2; QueenBitBoard queenWhite = new QueenBitBoard(ChessPieceColors.White); queenWhite.Bits = BoardSquare.D1; //Black PawnBitBoard pawnBlack = new PawnBitBoard(ChessPieceColors.Black); pawnBlack.Bits = BoardSquare.A7 | BoardSquare.B7 | BoardSquare.C5 | BoardSquare.E5 | BoardSquare.H5; RookBitBoard rookBlack = new RookBitBoard(ChessPieceColors.Black); rookBlack.Bits = BoardSquare.A8 | BoardSquare.H7; BishopBitBoard bishopBlack = new BishopBitBoard(ChessPieceColors.Black); bishopBlack.Bits = BoardSquare.C8 | BoardSquare.F8; QueenBitBoard queenBlack = new QueenBitBoard(ChessPieceColors.Black); queenBlack.Bits = BoardSquare.B4; KingBitBoard kingBlack = new KingBitBoard(ChessPieceColors.Black); kingBlack.Bits = BoardSquare.F7; KnightBitBoard knightBlack = new KnightBitBoard(ChessPieceColors.Black); knightBlack.Bits = BoardSquare.B8; //RookBitBoard badMove = new RookBitBoard( ChessPieceColors.Black ); //badMove.Bits = BoardSquare.B8; lolBoard.Update(pawnWhite); lolBoard.Update(knightWhite); lolBoard.Update(queenWhite); lolBoard.Update(rookWhite); lolBoard.Update(bishopWhite); lolBoard.Update(kingWhite); lolBoard.Update(pawnBlack); lolBoard.Update(rookBlack); lolBoard.Update(bishopBlack); lolBoard.Update(queenBlack); lolBoard.Update(kingBlack); lolBoard.Update(knightBlack); List <ColoredBitBoard> legalMoves = new List <ColoredBitBoard>(); legalMoves = MoveGen.GenerateLegalMoves(lolBoard, ChessPieceColors.Black); ColoredBitBoard bestMove = NegaMax.GetBestMove(lolBoard, 3, ChessPieceColors.Black, MoveGen.GenerateLegalMoves, Eval.EvaluateState); Console.Write(legalMoves.ToString() + bestMove.ToString()); }
private static void blackqueensidecastle() { //Winboard winboard = new Winboard(); ChessBoard lolBoard = new ChessBoard(); lolBoard.InitializeGame(); //White PawnBitBoard pawnWhite = new PawnBitBoard(ChessPieceColors.White); pawnWhite.Bits = BoardSquare.A2 | BoardSquare.B2 | BoardSquare.C2 | BoardSquare.D2 | BoardSquare.E4 | BoardSquare.H3; BishopBitBoard bishopWhite = new BishopBitBoard(ChessPieceColors.White); bishopWhite.Bits = BoardSquare.C1; KingBitBoard kingWhite = new KingBitBoard(ChessPieceColors.White); kingWhite.Bits = BoardSquare.D3; RookBitBoard rookWhite = new RookBitBoard(ChessPieceColors.White); rookWhite.Bits = BoardSquare.A1 | BoardSquare.H1; KnightBitBoard knightWhite = new KnightBitBoard(ChessPieceColors.White); knightWhite.Bits = BoardSquare.D2; QueenBitBoard queenWhite = new QueenBitBoard(ChessPieceColors.White); queenWhite.Bits = BoardSquare.D1; //Black PawnBitBoard pawnBlack = new PawnBitBoard(ChessPieceColors.Black); pawnBlack.Bits = BoardSquare.A7 | BoardSquare.B7 | BoardSquare.C7 | BoardSquare.C6 | BoardSquare.F7 | BoardSquare.G7 | BoardSquare.H7; RookBitBoard rookBlack = new RookBitBoard(ChessPieceColors.Black); rookBlack.Bits = BoardSquare.A8 | BoardSquare.H8; BishopBitBoard bishopBlack = new BishopBitBoard(ChessPieceColors.Black); bishopBlack.Bits = BoardSquare.F5 | BoardSquare.H4; QueenBitBoard queenBlack = new QueenBitBoard(ChessPieceColors.Black); queenBlack.Bits = BoardSquare.F2; KingBitBoard kingBlack = new KingBitBoard(ChessPieceColors.Black); kingBlack.Bits = BoardSquare.E8; KnightBitBoard knightBlack = new KnightBitBoard(ChessPieceColors.Black); knightBlack.Bits = BoardSquare.H6; //RookBitBoard badMove = new RookBitBoard( ChessPieceColors.Black ); //badMove.Bits = BoardSquare.B8; lolBoard.Update(pawnWhite); lolBoard.Update(knightWhite); lolBoard.Update(queenWhite); lolBoard.Update(rookWhite); lolBoard.Update(bishopWhite); lolBoard.Update(kingWhite); lolBoard.Update(pawnBlack); lolBoard.Update(rookBlack); lolBoard.Update(bishopBlack); lolBoard.Update(queenBlack); lolBoard.Update(kingBlack); lolBoard.Update(knightBlack); KingBitBoard test = new KingBitBoard(ChessPieceColors.Black); test.Bits = BoardSquare.C8; lolBoard.Update(test); List <ColoredBitBoard> legalMoves = new List <ColoredBitBoard>(); legalMoves = MoveGen.GenerateLegalMoves(lolBoard, ChessPieceColors.Black); ColoredBitBoard bestMove = NegaMax.GetBestMove(lolBoard, 3, ChessPieceColors.White, MoveGen.GenerateLegalMoves, Eval.EvaluateState); Console.Write(legalMoves.ToString() + bestMove.ToString()); }