public static void ImprimeTabuleiro(TabuleiroDoJogo tab, bool[,] posicoesPossiveis)// varre a matriz e imprime o tabuleiro com posicoes possiveis { ConsoleColor fundoO = Console.BackgroundColor; ConsoleColor fundoD = 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 = fundoD; } else { Console.BackgroundColor = fundoO; } ImprimirPeca(tab.retornaPeca(i, j)); Console.BackgroundColor = fundoO; } Console.WriteLine(); } Console.WriteLine(" a b c d e f g h \n"); Console.BackgroundColor = fundoO; }
public static void ImprimeTabuleiro(TabuleiroDoJogo tab)// varre a matriz e imprime o tabuleiro sem posicoes possiveis { for (int i = 0; i < tab.linhas; i++) { Console.Write(8 - i + " "); for (int j = 0; j < tab.colunas; j++) { ImprimirPeca(tab.retornaPeca(i, j)); } Console.WriteLine(); } Console.WriteLine(" a b c d e f g h \n"); }