internal void AddPlate(Plate plate) { plate.NowOn = this; plate.SetMoving(false); plates.AddFirst(plate); this.Controls.Add(plate); ResetPosition(); }
internal IEnumerable<Plate> MovingPlateOver(Plate temp) { foreach (var plate in plates) { plate.SetMoving(true); yield return plate; if (plate == temp) { break; } } }
internal static Plate[] CreatePlates(int num) { if (num == 1) { return new[] { new Plate() { Width = MAX_WIDTH, PlateNo = 1 } }; } else { int d = (MAX_WIDTH - MIN_WIDTH) / (num - 1); Plate[] ret = new Plate[num]; for (int i = 0; i < num; i++) { ret[i] = new Plate() { Width = MAX_WIDTH - d * i, PlateNo = num - i }; } return ret; } }