public static void imprimirTabuleiro(TabuleiroClasse 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.PecaTab(i, j)); Console.BackgroundColor = fundoOriginal; } Console.WriteLine(); } Console.WriteLine(" a b c d e f g h"); Console.BackgroundColor = fundoOriginal; }
public PartidaDeXadrez() { Tab = new TabuleiroClasse(8, 8); Turno = 1; JogadorAtual = Cor.Branca; Terminada = false; Xeque = false; VulneravelEnPassant = null; Pecas = new HashSet <Peca>(); Capturadas = new HashSet <Peca>(); ColocarPecas(); }
public static void imprimirTabuleiro(TabuleiroClasse tab) { for (int i = 0; i < tab.Linhas; i++) { Console.Write(8 - i + " "); for (int j = 0; j < tab.Colunas; j++) { ImprimirPeca(tab.PecaTab(i, j)); } Console.WriteLine(); } Console.WriteLine(" a b c d e f g h"); }
public Dama(TabuleiroClasse tab, Cor cor) : base(cor, tab) { }
public Torre(TabuleiroClasse tab, Cor cor) : base(cor, tab) { }
public Bispo(TabuleiroClasse tab, Cor cor) : base(cor, tab) { }
public Peao(TabuleiroClasse tab, Cor cor, PartidaDeXadrez partida) : base(cor, tab) { Partida = partida; }
public Cavalo(TabuleiroClasse tab, Cor cor) : base(cor, tab) { }