Exemplo n.º 1
0
        public override bool Equals(object obj)
        {
            TableroZinLock other = obj as TableroZinLock;

            if (other == null)
            {
                return(false);
            }
            return(object.Equals(this.tablero, other.tablero));
        }
Exemplo n.º 2
0
 public PartidaZinLock()
 {
     nivelCanon            = -1;
     temporizador          = new Timer();
     temporizador.Interval = 1000;
     temporizador.Elapsed += DescontarTiempo;
     tablero = new TableroZinLock();
     tablero.EmpiezaNivel(TableroZinLock.MAPAVACIO);
     tablero.FinMovimientoFichas += FichasMovidasEvent;
 }
Exemplo n.º 3
0
 public PartidaZinLock()
 {
     nivelCanon = -1;
     temporizador = new Timer();
     temporizador.Interval = 1000;
     temporizador.Elapsed += DescontarTiempo;
     tablero = new TableroZinLock();
     tablero.EmpiezaNivel(TableroZinLock.MAPAVACIO);
     tablero.FinMovimientoFichas += FichasMovidasEvent;
 }
Exemplo n.º 4
0
        void FichasMovidasEvent(object sender, EventArgs e)
        {
            TableroZinLock tablero = sender as TableroZinLock;

            movimientos++;
            if (FichasMovidas != null)
            {
                FichasMovidas(this, new PartidaZinLockEventArgs(this));
            }
            if (tablero.Solucionado())
            {
                if (FinPartida != null)
                {
                    FinPartida(this, new PartidaZinLockEventArgs(this));
                }
                temporizador.Enabled = false;
                if (nivelCanon != -1)
                {
                    nivelCanon++;
                    EmpiezaNivel(nivelCanon);
                }
            }
        }