public void Go(IRoundStrategy player) { string line; do { var sets = Dealer.Deal().ToList(); //var set = Dealer.GetCards("SA HT CQ D2 H3 H4 S5 S6 H5 H7 HJ HQ HK"); //sets[0] = set; var playerSimple = new SimpleRoundStrategy(); var mlRounds = player.GetBestRoundsWithScore(sets[0], 10).ToList(); var simpleRounds = playerSimple.GetBestRounds(sets[0], 10).ToList(); for (var i = 0; i < mlRounds.Count; i++) { System.Console.WriteLine($"{mlRounds[i].Value,-4:0} {mlRounds[i].Key}"); System.Console.WriteLine($" {simpleRounds[i]}"); System.Console.WriteLine("======================"); } line = System.Console.ReadLine(); System.Console.Clear(); } while (line != "q"); }
public DutyTaxCalculator(IRoundStrategy roundStrategy) { _roundStrategy = roundStrategy; }
public Calculator(IRoundStrategy roundOptions) { RoundOptions = roundOptions ?? throw new ArgumentNullException(nameof(roundOptions)); }
public SalesTaxCalculator(IRoundStrategy roundStrategy, List <Type> exceptions) { _roundStrategy = roundStrategy; _exceptions = exceptions; }
public void SetStrategy(IRoundStrategy strategy) { }