コード例 #1
0
        /// <summary>
        /// Displays a formatted 8x8 array in the console containing the value of each index of the bitboard.
        /// </summary>
        public static void DisplayBoardState(Bitboard b)
        {
            for (int i = b.Board.Length; i > 0; i -= 8)
            {
                for (int j = 8; j > 0; j--)
                {
                    Console.Write("{0} ", b.Board[i - j] == false ? "0" : "1");

                    if ((i - j + 1) % 8 == 0)
                    {
                        Console.WriteLine("");
                    }
                }
            }

            Console.WriteLine("");
        }
コード例 #2
0
        /// <summary>
        /// Displays a formatted 8x8 array in the console of each index of the bitboard.
        /// </summary>
        public static void DisplayBoardIndices(Bitboard b)
        {
            for (int i = b.Board.Length; i > 0; i -= 8)
            {
                for (int j = 8; j > 0; j--)
                {
                    Console.Write((i - j).ToString() + " ");

                    if ((i - j + 1) % 8 == 0)
                    {
                        Console.WriteLine("");
                    }
                }
            }

            Console.WriteLine("");
        }