public void grabItem(Items i) { if (i.Weight + weight < capacity) { itemContainer.Add(i); } else { System.Windows.Forms.MessageBox.Show("You cannot carry any more","Capacity exceeded"); } }
public void throwItem(Items id) { itemContainer.Remove(id); weight -= id.Weight; }