/// <summary> /// Transferring money from one vault to another /// </summary> /// <param name="Source">Source storage</param> /// <param name="Destination">Destination Storage</param> /// <param name="Sum">Amount to be transferred</param> /// <returns>true if there are enough coins in the source</returns> public static bool TransferMoney(CoinAcceptor Source, CoinAcceptor Destination, int Sum) { var Enough = Source.IsCoinsEnough(Sum); if (Enough) { Destination.Push(Source.Get(Sum)); } return(Enough); }