/*private Random randomGenerator;*/

        /*public Die(int numberOfSides, Random random)
         * {
         *  this.numberOfSides = numberOfSides;
         *  this.randomGenerator = random;
         * }*/
        public Die(int numberOfSides)
        {
            this.numberOfSides = numberOfSides;
            /*this.randomGenerator = new Random();*/
            this.random = RandomGenerator.GetInstance();
        }
示例#2
0
 public Die(int numberOfSides)
 {
     this.numberOfSides   = numberOfSides;
     this.randomGenerator = RandomGenerator.GetInstance();
 }
示例#3
0
 public Die2(int numberOfSides)
 {
     this.numberOfSides   = numberOfSides;
     this.randomGenerator = new RandomGenerator();
 }