Ejemplo n.º 1
0
        public VentanaJuego(VentanaReestricciones ventanaReestricciones, Juego juegi)
        {
            InitializeComponent();
            reestricciones = ventanaReestricciones;
            this.juego     = juegi;

            lblCantidadMaximaQuitar.Text = juego.cantidadMaximaQuePuedeQuitar() + "";
            lblCantidadPiedras.Text      = juego.getMonton().Count + "";
            label1.Text = "PC vs " + juego.getJugador().getApodo();
            pintarPiedras();
            if (juego.EmpiezaPc)
            {
                btnTurnoJugador.Enabled   = false;
                btnTurnoJugador.BackColor = Color.DarkGray;
            }
            else
            {
                btnTurnoPC.Enabled   = false;
                btnTurnoPC.BackColor = Color.DarkGray;
            }
            lblProporcion.Text = juego.getRestriccion() + "";
            if (juego.isGanaLaUltimaPiedra())
            {
                lblQuienGana.Text = "SI";
            }
            else
            {
                lblQuienGana.Text = "NO";
            }
            lblCantidadFinal.Text    = juego.getCantidadFinal() + "";
            lblCantidadFinal.Visible = true;
        }
Ejemplo n.º 2
0
        private void btnEmpezar_Click(object sender, EventArgs e)
        {
            if (!comboApodo.Text.Equals(""))
            {
                jugador = new Jugador(comboApodo.Text);


                reestricciones         = new VentanaReestricciones(this, jugador);
                reestricciones.Visible = true;
                this.Visible           = false;
            }
            else
            {
                MessageBox.Show("Ingrese un apodo porfavor.");
            }
        }