Exemplo n.º 1
0
 private void button9_Click(object sender, EventArgs e)
 {
     be.Truco truco = trucoServices.TrucoCantable();
     frmValeCuatro              = new frmTruco(truco.reCantar.reCantar, partida.Turno.Jugador, false);
     frmValeCuatro.FormClosing += FrmValeCuatroTruco_closing;
     frmValeCuatro.ShowDialog();
 }
Exemplo n.º 2
0
        // cantar truco
        private void button2_Click(object sender, EventArgs e)
        {
            be.Truco truco = trucoServices.TrucoCantable();
            frmTruco = new frmTruco(truco, partida.Turno.Jugador, true);

            frmTruco.FormClosing += FrmTruco_closing;
            frmTruco.ShowDialog();
        }
Exemplo n.º 3
0
 private void button8_Click(object sender, EventArgs e)
 {
     be.Truco truco = trucoServices.TrucoCantable();
     frmReTruco              = new frmTruco(truco.reCantar, partida.Turno.Jugador, true);
     frmReTruco.FormClosing += FrmReTrucoBtn_closing;
     frmReTruco.ShowDialog();
     button8.Enabled = false;
     button9.Enabled = true;
 }
Exemplo n.º 4
0
        public be.Partida IniciarJuego(List <be.Jugador> jugadores, bll.Ronda rondaServices)
        {
            be.Truco   truco   = new be.Truco();
            be.Partida partida = new be.Partida(jugadores);
            be.Turno   turno   = new be.Turno();
            turno.Jugador = jugadores[0];
            partida.Turno = turno;

            rondaServices.AsignarPartida(partida);
            rondaServices.CrearRonda();
            rondaServices.RepartirCartas(jugadores);

            return(partida);
        }
Exemplo n.º 5
0
        public be.Truco TrucoCantable()
        {
            be.Truco truco = new be.Truco();
            truco.nombre = "Truco";
            be.ReTruco retruco = new be.ReTruco();
            retruco.nombre = "ReTruco";
            be.ValeCuatro valeCuatro = new be.ValeCuatro();
            valeCuatro.nombre = "Vale Cuatro";
            retruco.reCantar  = valeCuatro;

            truco.reCantar = retruco;


            return(truco);
        }
Exemplo n.º 6
0
        private void FrmValeCuatroTrucoBtn_closing(object sender, FormClosingEventArgs e)
        {
            be.Truco truco = trucoServices.TrucoCantable();
            switch (frmValeCuatro.button)
            {
            case "y":
                partida.Rondas[rondaServices.RondaActual].Valor = truco.reCantar.reCantar.PuntosQueridos;
                button2.Enabled = false;
                break;

            case "n":
                noQuerido(truco.reCantar.reCantar.PuntosNoQueridos, trucoServices.jugadorContrario(partida.Turno.Jugador, jugadores));
                break;
            }
        }
Exemplo n.º 7
0
        private void FrmTruco_closing(object sender, FormClosingEventArgs e)
        {
            be.Truco truco = trucoServices.TrucoCantable();

            switch (frmTruco.button)
            {
            case "y":
                partida.Rondas[rondaServices.RondaActual].Valor = truco.PuntosQueridos;
                button8.Enabled = true;
                button2.Enabled = false;
                break;

            case "n":
                noQuerido(truco.PuntosNoQueridos, partida.Turno.Jugador);
                break;

            case "rc":
                frmReTruco              = new frmTruco(truco.reCantar, trucoServices.jugadorContrario(partida.Turno.Jugador, jugadores), true);
                frmReTruco.FormClosing += FrmReTruco_closing;
                frmReTruco.ShowDialog();

                break;
            }
        }