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