public int RandomlySelectDoorWithPrize(int numberOfDoors) { GetRandomNumber randomNumberGenerator = new GetRandomNumber(new Random()); int doorWithPrizeNumber = randomNumberGenerator.getRandomInt(0, numberOfDoors); return(doorWithPrizeNumber); }
public int RandomlySelectDoorWithPrize(int numberOfDoors, GetRandomNumber randomNumberGenerator) { int doorWithPrizeNumber = randomNumberGenerator.getRandomInt(0, numberOfDoors); return(doorWithPrizeNumber); }
public Monty(int numberOfDoors, GetRandomNumber randomNumberGenerator) { this.Doors = new Door[numberOfDoors]; GenerateDoors(numberOfDoors, RandomlySelectDoorWithPrize(numberOfDoors, randomNumberGenerator)); }