public void InsertCoin(Coin coin) { if (_status != MachineStatus.Running) throw new Exception("The machine is not running."); if (_rBox == null) _rBox = new CoinBox(ReceiveCoinBox); _rBox.AddCoins(coin, 1); _msg.Show(string.Format("Coin {0} has inserted.", coin)); }
public StashIsOutOfSuchCoinException(Coin coin) { Coin = coin; }
public void DepositCoin(Coin coin) { _coinStash.Put(coin); DepositAmount += coin.Value; }