public static void ImprimirTabuleiro(Tabuleiro tab, bool [,] posicoesPossiveis) { ConsoleColor fundoOriginal = Console.BackgroundColor; ConsoleColor fundoAlterado = ConsoleColor.DarkGray; for (int i = 0; i < tab.Linhas; i++) { System.Console.Write(8 - i + " "); for (int j = 0; j < tab.Colunas; j++) { if (posicoesPossiveis[i, j]) { Console.BackgroundColor = fundoAlterado; } else { Console.BackgroundColor = fundoOriginal; } ImprimirPeca(tab.PecaEspecifica(i, j)); Console.BackgroundColor = fundoOriginal; } System.Console.WriteLine(); } System.Console.WriteLine(" a b c d e f g h"); Console.BackgroundColor = fundoOriginal; }
public static void ImprimirTabuleiro(Tabuleiro tab) { for (int i = 0; i < tab.Linhas; i++) { System.Console.Write(8 - i + " "); for (int j = 0; j < tab.Colunas; j++) { ImprimirPeca(tab.PecaEspecifica(i, j)); } System.Console.WriteLine(); } System.Console.WriteLine(" a b c d e f g h"); }