Esempio n. 1
0
 public void Check(Roullete roullete)
 {
     if (roullete == null)
     {
         throw new ArgumentNullException(nameof(roullete) + "can't be null");
     }
 }
Esempio n. 2
0
        public void OnNumber(Roullete roullete, int value)
        {
            Check(roullete);

            if (value < 0 || value > 36)
            {
                throw new ArgumentException(nameof(roullete) + "can't be less than 0 and more than 36");
            }

            this.number        = value;
            roullete.OnNumber += ShowMessageOnNumber;
        }
Esempio n. 3
0
 public void OnBlack(Roullete roullete)
 {
     Check(roullete);
     roullete.BlackNumber += ShowMessage;
     roullete.RedNumber   -= ShowMessage;
 }
Esempio n. 4
0
 public void OnEven(Roullete roullete)
 {
     Check(roullete);
     roullete.EvenNumber += ShowMessage;
     roullete.OddNumber  -= ShowMessage;
 }