using System; using CzokoŚmieciarka.MonoGameView.DataModels.Interfaces; using CzokoŚmieciarka.MonoGameView.DataModels.Interfaces.Garbage; namespace CzokoŚmieciarka.MonoGameView.DataModels.GeneralModels.Models { public class BasicGarbage : AGarbage { public BasicGarbage(TypeOfGarbage typeOfGarbage, double weight) : base(typeOfGarbage, weight) { } protected override AGarbage Add(AGarbage garbageToAdd) { return new BasicGarbage((TypeOfGarbage)TypeOfGarbage, Weight + garbageToAdd.Weight); } protected override AGarbage Subtract(AGarbage garbageToSubtract) { return new BasicGarbage((TypeOfGarbage)TypeOfGarbage, Weight - garbageToSubtract.Weight); } public override object Clone() { return new BasicGarbage((TypeOfGarbage)TypeOfGarbage.Clone(), Weight); } } }