///// <summary> ///// If duplicated than adds ///// </summary> //internal void add(Storage need) //{ // base.add(need); // consumedLastTurn.add(need) //} ///// <summary> ///// If duplicated than adds ///// </summary> //internal void add(PrimitiveStorageSet need) //{ } /// <summary> /// Do checks outside /// Supports takenAway /// </summary> public bool send(Producer whom, Storage what) { if (base.send(whom, what)) { used.Add(what); return(true); } else { return(false); } }
/// <summary> /// checks inside (duplicates?) /// </summary> public void send(StorageSet whom, Storage howMuch) { if (has(howMuch)) { Storage targetStorage = new Storage(howMuch); whom.Add(targetStorage); this.subtract(howMuch); } }