public static void ImprimirTabuleiro(Tabuleiro.Tabuleiro tabuleiro, bool[,] posicoesPossiveis) { ConsoleColor originalBackground = Console.BackgroundColor; ConsoleColor alteredBackground = ConsoleColor.DarkGray; for (int i = 0; i < tabuleiro.Linhas; i++) { Console.BackgroundColor = originalBackground; Console.Write($"{8 - i} "); for (int j = 0; j < tabuleiro.Colunas; j++) { if (posicoesPossiveis[i, j]) { Console.BackgroundColor = alteredBackground; } ImprimirPeca(tabuleiro.GetPeca(i, j)); if (Console.BackgroundColor != originalBackground) { Console.BackgroundColor = originalBackground; } } Console.WriteLine(); } Console.BackgroundColor = originalBackground; Console.WriteLine(" a b c d e f g h"); }
public PartidaDeXadrez() { tab = new Tabuleiro.Tabuleiro(8, 8); turno = 1; jogadorAtual = Cor.Branca; pecas = new HashSet <Peca>(); capturadas = new HashSet <Peca>(); xeque = false; colocarPecas(); terminada = false; vuneravelEnPassant = null; }
public PartidaDeXadrez() { tab = new Tabuleiro.Tabuleiro(8, 8); Turno = 1; JogadorAtual = Cor.Branca; Terminada = false; Cheque = false; VulneravelEnPassant = null; Pecas = new HashSet <Peca>(); Capturadas = new HashSet <Peca>(); ColocarPecas(); }
public PartidaDeXadrez() { Tabuleiro = new Tabuleiro.Tabuleiro(8, 8); Terminada = false; Turno = 1; JogadorAtual = Cor.Branco; Xeque = false; _pecas = new HashSet <Peca>(); _pecasCapturadas = new HashSet <Peca>(); ColocarPecas(); }
public static void ImprimirTabuleiro(Tabuleiro.Tabuleiro tabuleiro) { for (int i = 0; i < tabuleiro.Linhas; i++) { Console.Write($"{8 - i} "); for (int j = 0; j < tabuleiro.Colunas; j++) { ImprimirPeca(tabuleiro.GetPeca(i, j)); } Console.WriteLine(); } Console.WriteLine(" a b c d e f g h"); }
// Inicia a partida public PartidaDeXadrez() { // Coloca o tabuleiro tab = new Tabuleiro.Tabuleiro(8, 8); turno = 1; jogadorAtual = Cor.Branca; terminada = false; vuneravelEnPassant = null; pecas = new HashSet <Peca>(); capturadas = new HashSet <Peca>(); //Coloca as peças no tabuleiro colocarPecas(); }
public Rei(Tabuleiro.Tabuleiro tabuleiro, CorEnum cor) : base(tabuleiro, cor) { }
public Cavalo(Tabuleiro.Tabuleiro tab, Cor cor) : base(tab, cor) { }
public Rainha(Tabuleiro.Tabuleiro tabuleiro, Cor cor) : base(tabuleiro, cor) { }
public Peao(Tabuleiro.Tabuleiro tab, Cor cor, PartidaDeXadrez partida) : base(tab, cor) { Partida = partida; }
public Dama(Tabuleiro.Tabuleiro tabuleiro, CorEnum cor) : base(tabuleiro, cor) { }
public Cavalo(Tabuleiro.Tabuleiro tabuleiro, CorEnum cor) : base(tabuleiro, cor) { }
public Torre(Tabuleiro.Tabuleiro tabuleiro, CorEnum cor) : base(tabuleiro, cor) { }
public Dama(Tabuleiro.Tabuleiro tab, Cor cor) : base(tab, cor) { }
public Peao(Tabuleiro.Tabuleiro tabuleiro, Cor cor) : base(tabuleiro, cor) { }
public Bispo(Tabuleiro.Tabuleiro tabuleiro, Cor cor) : base(tabuleiro, cor) { }
public Rei(Tabuleiro.Tabuleiro tab, Cor cor, PartidaDeXadrez partida) : base(tab, cor) { this.partida = partida; }
public Torre(Tabuleiro.Tabuleiro tab, Cor cor) : base(tab, cor) { }