示例#1
0
        void RemoveUnit(Unit Unit)
        {
            var       from      = _Stacks.FirstOrDefault(i => i.Value.Contains(Unit));
            StackView fromStack = from.Value;

            if (fromStack != null)
            {
                fromStack.Remove(Unit);
                if (fromStack.Units.Count() == 0)
                {
                    _Stacks.Remove(from);
                }
            }
        }
示例#2
0
 public void Merge(StackView StackView)
 {
     _UnitViews.AddRange(StackView._UnitViews);
     Sort();
 }