Beispiel #1
0
        public static void ImprimirTabuleiro(Tabuleiro tabuleiro, bool[,] movimentosPossiveis)
        {
            ConsoleColor backgroundOriginal = Console.BackgroundColor;
            ConsoleColor fundoAlterado      = ConsoleColor.DarkGray;

            for (int i = 0; i < tabuleiro.linhas; i++)
            {
                Console.Write(8 - i + " ");
                for (int j = 0; j < tabuleiro.colunas; j++)
                {
                    Peca p = tabuleiro.GetPeca(i, j);

                    if (movimentosPossiveis[i, j])
                    {
                        Console.BackgroundColor = fundoAlterado;
                    }
                    else
                    {
                        Console.BackgroundColor = backgroundOriginal;
                    }

                    Tela.ImprimirPecas(p);
                    Console.BackgroundColor = backgroundOriginal;
                }
                Console.WriteLine();
            }

            Console.WriteLine("   a b c d e f g h");
            Console.BackgroundColor = backgroundOriginal;
        }
Beispiel #2
0
        public static void ImprimirTabuleiro(Tabuleiro tabuleiro, bool[,] posicoesPossiveis)
        {
            Console.BackgroundColor = corFundoPadrao;
            Console.ForegroundColor = corTextoPadrao;

            for (int i = 0; i < tabuleiro.NumLinhas; i++)
            {
                Console.ForegroundColor = corLegendaTabuleiro;
                Console.Write(8 - i + " ");
                Console.ForegroundColor = corTextoPadrao;
                for (int j = 0; j < tabuleiro.NumColunas; j++)
                {
                    if (posicoesPossiveis[i, j])
                    {
                        Console.BackgroundColor = corFundoAlterado;
                    }
                    else
                    {
                        Console.BackgroundColor = corFundoPadrao;
                    }
                    ImprimirPeca(tabuleiro.GetPeca(i, j));
                    Console.BackgroundColor = corFundoPadrao;
                }
                Console.WriteLine();
            }
            Console.ForegroundColor = corLegendaTabuleiro;
            Console.WriteLine("  a b c d e f g h\n");
            Console.ForegroundColor = corTextoPadrao;
            Console.BackgroundColor = corFundoPadrao;
        }
Beispiel #3
0
        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.GetPeca(i, j));
                    Console.BackgroundColor = fundoOriginal;
                }
                Console.WriteLine();
            }

            Console.WriteLine("  a b c d e f g h");
            Console.BackgroundColor = fundoOriginal;
        }
Beispiel #4
0
 public static void ImprimirTabuleiro(Tabuleiro tabuleiro)
 {
     for (int i = 0; i < tabuleiro.linhas; i++)
     {
         Console.Write(8 - i + " ");
         for (int j = 0; j < tabuleiro.colunas; j++)
         {
             Peca p = tabuleiro.GetPeca(i, j);
             Tela.ImprimirPecas(p);
         }
         Console.WriteLine();
     }
     Console.WriteLine("   a b c d e f g h");
 }
Beispiel #5
0
        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.GetPeca(i, j));
                }
                Console.WriteLine();
            }

            Console.WriteLine("  a b c d e f g h");
        }
Beispiel #6
0
 public static void ImprimirTabuleiro(Tabuleiro tabuleiro)
 {
     Console.BackgroundColor = corFundoPadrao;
     Console.ForegroundColor = corTextoPadrao;
     for (int i = 0; i < tabuleiro.NumLinhas; i++)
     {
         Console.ForegroundColor = corLegendaTabuleiro;
         Console.Write(8 - i + " ");
         Console.ForegroundColor = corTextoPadrao;
         for (int j = 0; j < tabuleiro.NumColunas; j++)
         {
             ImprimirPeca(tabuleiro.GetPeca(i, j));
         }
         Console.WriteLine();
     }
     Console.ForegroundColor = corLegendaTabuleiro;
     Console.WriteLine("  a b c d e f g h\n");
     Console.ForegroundColor = corTextoPadrao;
 }