Example #1
0
 public DiceManager(int numberOfDice)
 {
     _maxDiceNumber = numberOfDice;
     _rnd = new Random((Int32)DateTime.Now.Ticks);
     DiceArray = new Dice[numberOfDice];
     for (int i = 0; i < _maxDiceNumber; i++ )
     {
         DiceArray[i] = new Dice(6, _rnd);
     }
 }
Example #2
0
 public DiceViewModel(Dice model)
 {
     _model = model;
     _model.ResultChangedEvent += HandleResultChanged;
     _model.LockChangedEvent += HandleLockChanged;
 }