Пример #1
0
 public void Resize()
 {
     foreach (Token t in Fila)
     {
         GToken tt = (GToken)t;
         tt.Label.Location = GTablero.calculatePosition(tt.Posicion, panel);
     }
 }
Пример #2
0
 public void Reset()
 {
     foreach (Token t in Fila)
     {
         t.Posicion = 1;
         GToken tt = (GToken)t;
         tt.Label.Location = GTablero.calculatePosition(1, panel);
     }
     Ganador = null;
 }
Пример #3
0
        public static void Animate(Point current, int casillaDestino, Form1 form, Panel panel)
        {
            Point destination = GTablero.calculatePosition(casillaDestino, panel);

            instance        = form;
            distanceX       = destination.X - current.X;
            distanceY       = destination.Y - current.Y;
            stepX           = distanceX / 100;
            stepY           = distanceY / 100;
            currentX        = current.X;
            currentY        = current.Y;
            destinationX    = destination.X;
            destinationY    = destination.Y;
            aTimer.Elapsed += new ElapsedEventHandler(Animation);
            aTimer.Interval = 40;
            aTimer.Enabled  = true;
        }
Пример #4
0
 public GMaster(GTablero tab, Panel panel, Form1 form) : base(tab)
 {
     this.panel = panel;
     this.form  = form;
     dado       = new GDice(form);
 }