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