public Sky(Box bin, int spreadFactor, Box[] input) { this.skylines = new LStack <Skyline>(); this.backBuffer = new LStack <Skyline>(); this.skylines.Add(new Skyline { x = 0, h = 0, w = bin.w, rFit = bin.w, lFit = bin.w, }); this.binIndex = 0; this.bin = bin; this.input = input; this._toPack = new LStack <int>(this.input.Length); for (int i = 0; i < this.input.Length; ++i) { _toPack.Add(i); } this.packCandidates = new LStack <PackCandidate>(); this.candComp = new CandidateComparer(this); this.spreadFactor = spreadFactor; this.lowestSky = this.highestSky = 0; }
protected BaseCore(char letter, int durability) { Letter = letter; Durability = durability; this.fragments = new LStack(); this.state = State.Normal; this.initialDurability = durability; }
protected Core(CoreType coreType, int maxDurability) { nameIntValue++; this.coreType = coreType; this.MaxDurability = maxDurability; this.fragments = new LStack(); this.Name = (char)nameIntValue; }
public static void PopAll(LStack stk) { int num = stk.Pop(); while (num > 0) { Console.Write(num + " "); num = stk.Pop(); } }
public static void PrintAll(LStack stk) { var node = stk.Head; while (node != null) { Console.Write(node.Val + " "); node = node.Next; } }
protected BaseCore(string type, int durability, string name) { this.Type = type; this.Name = name; this.initialDurability = durability; this.Durability = durability; this.fragments = new LStack(); this.state = CoreState.NORMAL; this.pressureOnCore = 0; }
public static LStack Create(int[] values) { var stk = new LStack(); for (int i = 0; i < values.Length; i++) { stk.Push(values[i]); } return(stk); }
protected BaseCore(string name, int durability) { this.Name = name; this.Durability = durability; this.attachedFragments = new LStack <IFragment>(); }
public void SetUp() { this.testStack = new LStack <IFragment>(); }
public void Dispose() { source = null; }
public void TestInit() { this.collection = new LStack(); }