Exemple #1
0
        public static void Main()
        {
            try
            {
                LotteryDraw l1 = new LotteryDraw(47);
                LotteryDraw l2 = new LotteryDraw(47);
                LotteryDraw l3 = new LotteryDraw(47);

                //Console.WriteLine(l1.MaxNumber);
                //validated input is as expected

                //l1.Draw(6);
                //Console.WriteLine(l1.ToString());


                //Console.WriteLine(l1.NumbersDrawn.Count());
                //validated list is of correct size (dependent on draw parm)

                //drawing numbers
                l1.Draw(6);
                l2.Draw(6);
                l3.Draw(6);

                LotteryDrawHistory ldh1 = new LotteryDrawHistory();

                ldh1.AddLotteryDraw(l1);
                ldh1.AddLotteryDraw(l2);
                ldh1.AddLotteryDraw(l3);

                Console.WriteLine(ldh1.ToString());

                //Console.WriteLine(ldh1.DrawHistory[0]);

                //frequency outputs sorted collection of int, can currently only
                //scan with eyes to see duplicates
                ldh1.FrequentNum(ldh1.DrawHistory);
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
Exemple #2
0
 public void AddLotteryDraw(LotteryDraw l)
 {
     //will come back to add the complexity of restrictions
     DrawHistory.Add(l);
 }
Exemple #3
0
 public void AddLotteryDraw(LotteryDraw lotteryDraw)
 {
     this.history.Add(lotteryDraw);
 }