示例#1
0
        private void AtualizarInformacoes()
        {
            lblTurno.Text   = PartidaDeXadrez.Turno + "º";
            lblJogador.Text = PartidaDeXadrez.JogadorAtual.ToString().ToUpper();
            if (lblJogador.Text == "AZUL")
            {
                lblJogador.ForeColor = Color.DarkBlue;
            }
            else
            {
                lblJogador.ForeColor = Color.Red;
            }

            lblCapturadasAzul.Text     = "[  ";
            lblCapturadasVermelho.Text = "[  ";
            foreach (var item in PartidaDeXadrez.PecasCapturadas(Cor.Azul))
            {
                lblCapturadasAzul.Text += item + "  ";
            }
            foreach (var item in PartidaDeXadrez.PecasCapturadas(Cor.Vermelho))
            {
                lblCapturadasVermelho.Text += item + "  ";
            }
            lblCapturadasAzul.Text     += "]";
            lblCapturadasVermelho.Text += "]";

            TimeSpan aux = PartidaDeXadrez.TempoJogadorA;

            lblTempoA.Text     = PartidaDeXadrez.AjustarTempo(aux);
            aux                = PartidaDeXadrez.TempoJogadorB;
            lblTempoB.Text     = PartidaDeXadrez.AjustarTempo(aux);
            aux               += PartidaDeXadrez.TempoJogadorA;
            lblTempoTotal.Text = PartidaDeXadrez.AjustarTempo(aux);
        }