예제 #1
0
        static void MoveGeneratorTestTwo()
        {
            Position testPosition = FENParser.ParseFEN("7k/8/8/6p1/5pP1/5Pn1/6PN/7K w - - 0 1".Split(' '));

            foreach ((Position position, Move move) in testPosition.GeneratePositions())
            {
                ConsoleGraphics.DrawPosition(position);
            }
            Console.ReadKey();
        }
예제 #2
0
        static void MoveGeneratorTestOne()
        {
            Position testPosition = new Position();
            Move     newMove      = new Move(0, 6, 0, 5, 1);

            testPosition = testPosition.MakeMove(newMove);
            foreach ((Position position, Move move) in testPosition.GeneratePositions())
            {
                ConsoleGraphics.DrawPosition(position);
            }
            Console.ReadKey();
        }
예제 #3
0
        private static void InputPrint()
        {
            Position gamePosition = currentPosition;

            ConsoleGraphics.DrawPosition(gamePosition);
            Console.WriteLine(string.Format("To move: {0}\nEn passant square: {1}\nFifty move proxmity: {2}",
                                            gamePosition.toMove, gamePosition.enPassantSquare, gamePosition.fiftyMoveProximity));
            Console.Write("Castling rights: ");
            foreach (bool castlingRight in gamePosition.castlingRights)
            {
                Console.Write(castlingRight + " ");
            }
            Console.WriteLine();
        }