示例#1
0
 public Banker()
 {
     var largestCoinType = Enum.GetValues(typeof(Coin)).Cast<Coin>().Max();
     chiefBreaker = new CoinBreaker(largestCoinType);
 }
示例#2
0
 public CoinBreaker(Coin coin)
 {
     CurrentCoinType = coin;
     NextCoinType = _coinTypes.FirstOrDefault(x => x < CurrentCoinType);
     if (NextCoinType > 0)
     {
         _nextBreaker = new CoinBreaker(NextCoinType);
     }
 }