コード例 #1
0
ファイル: AwesomeTest.cs プロジェクト: hieplenet/CodingDojo
 public Banker()
 {
     var largestCoinType = Enum.GetValues(typeof(Coin)).Cast<Coin>().Max();
     chiefBreaker = new CoinBreaker(largestCoinType);
 }
コード例 #2
0
ファイル: AwesomeTest.cs プロジェクト: hieplenet/CodingDojo
 public CoinBreaker(Coin coin)
 {
     CurrentCoinType = coin;
     NextCoinType = _coinTypes.FirstOrDefault(x => x < CurrentCoinType);
     if (NextCoinType > 0)
     {
         _nextBreaker = new CoinBreaker(NextCoinType);
     }
 }