public void Remove(Item a) { int static_index_a = ItemStructure.GetIndex(a); int getA = Items.FindIndex(y => ItemStructure.GetIndex(y) == static_index_a); Items.Remove(Items[getA]); }
public void Switch(Item a, Item b) { int static_index_a = ItemStructure.GetIndex(a); int static_index_b = ItemStructure.GetIndex(b); int getA = Items.FindIndex(y => ItemStructure.GetIndex(y) == static_index_a); int getB = Items.FindIndex(y => ItemStructure.GetIndex(y) == static_index_b); var _a_ = Items[getA]; Items[getA] = Items[getB]; Items[getB] = _a_; }