public static void ImprimirTabuleiro(TABULEIRO tab, bool[,] posicoesPossiveis) { ConsoleColor fundoOriginal = Console.BackgroundColor; ConsoleColor fundoAlterado = ConsoleColor.DarkGray; for (int i = 0; i < tab.Linhas; i++) { 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.Peca(i, j)); Console.BackgroundColor = fundoOriginal; } Console.WriteLine(); } 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++) { Console.Write($"{8 - i} "); for (int j = 0; j < tab.Colunas; j++) { ImprimirPeca(tab.Peca(i, j)); } Console.WriteLine(); } Console.WriteLine(" a b c d e f g h"); }