Ejemplo n.º 1
0
 /// <summary>
 /// Constructor of Number Game
 /// Contains 2 parameters as 2 bounds of number range for the game
 /// </summary>
 /// <param name="lBound">Serves as the lower bound of number range</param>
 /// <param name="uBound">Serves as the upper bound of number range</param>
 public NumberGame(int lBound, int uBound)
 {
     _round      = 0;
     _roundScore = new int[5];
     _totalScore = 0;
     _range      = new NumberRange(lBound, uBound);
     _numberList = new NumberList(_range);
     _result     = new GameResult();
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Constructor of Number List that gets NumberRange as number range to generate new 5 random numbers
 /// </summary>
 /// <param name="range">Serves as number range of Number Game</param>
 public NumberList(NumberRange range)
 {
     this._range = range;
     _numbers    = new int[5];
     _frequency  = new int[10];
 }