Esempio n. 1
0
        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");
        }
Esempio n. 2
0
 public DutyTaxCalculator(IRoundStrategy roundStrategy)
 {
     _roundStrategy = roundStrategy;
 }
Esempio n. 3
0
 public Calculator(IRoundStrategy roundOptions)
 {
     RoundOptions = roundOptions ?? throw new ArgumentNullException(nameof(roundOptions));
 }
Esempio n. 4
0
 public SalesTaxCalculator(IRoundStrategy roundStrategy, List <Type> exceptions)
 {
     _roundStrategy = roundStrategy;
     _exceptions    = exceptions;
 }
Esempio n. 5
0
 public void SetStrategy(IRoundStrategy strategy)
 {
 }