public static void printBoard(Board board) { for (int i = 0; i < board.Lines; i++) { Console.Write(8 - i + " "); for (int j = 0; j < board.Columns; j++) { printPiece(board.getPiece(i, j)); } Console.WriteLine(); } Console.WriteLine(" a b c d e f g h"); }
internal static void printBoard(Board board, bool[,] possiblePositions) { ConsoleColor originalBackground = Console.BackgroundColor; ConsoleColor alteredBackground = ConsoleColor.DarkGray; for (int i = 0; i < board.Lines; i++) { Console.Write(8 - i + " "); for (int j = 0; j < board.Columns; j++) { Console.BackgroundColor = possiblePositions[i, j] ? alteredBackground : originalBackground; printPiece(board.getPiece(i, j)); Console.BackgroundColor = originalBackground; } Console.WriteLine(); } Console.WriteLine(" a b c d e f g h"); Console.BackgroundColor = originalBackground; }