Beispiel #1
0
 public Spinner(
     IElementsMatrix machineSlots,
     IRandomElementPicker randomElementPicker,
     IWinCalculator winCalculator)
 {
     this.machineSlots        = machineSlots;
     this.randomElementPicker = randomElementPicker;
     this.winCalculator       = winCalculator;
 }
Beispiel #2
0
        public Fish(IRandomElementPicker randomElementPicker, int stepsUntilReproduction)
        {
            if (stepsUntilReproduction < 0)
            {
                throw new ArgumentOutOfRangeException(nameof(stepsUntilReproduction),
                    "stepsUntilReproduction should not be negative");
            }

            RandomElementPicker = randomElementPicker;
            StepsUntilReproduction = stepsUntilReproduction;
        }
Beispiel #3
0
        public Reproducer(IReproducableOrganism organism, IRandomElementPicker randomElementPicker, int stepsUntilReproduction)
        {
            if (stepsUntilReproduction < 0)
            {
                throw new ArgumentOutOfRangeException(nameof(stepsUntilReproduction),
                                                      "stepsUntilReproduction should not be negative");
            }

            Organism               = organism;
            RandomElementPicker    = randomElementPicker;
            StepsUntilReproduction = stepsUntilReproduction;
        }