示例#1
0
        public static void ImprimirTabuleiro(Tabuleiro.Tabuleiro tab, bool[,] posicoesPossives)
        {
            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 (posicoesPossives[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;
        }
示例#2
0
 public static void ImprimirTabuleiro(Tabuleiro.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");
 }