public void Resize() { foreach (Token t in Fila) { GToken tt = (GToken)t; tt.Label.Location = GTablero.calculatePosition(tt.Posicion, panel); } }
public void Reset() { foreach (Token t in Fila) { t.Posicion = 1; GToken tt = (GToken)t; tt.Label.Location = GTablero.calculatePosition(1, panel); } Ganador = null; }
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; }