void ThenHazardsHaveExpectedHeights(List <Hazard> spawnedHazards) { var randomService = new RandomFloat(new Random(RandomSeed)); foreach (var hazard in spawnedHazards) { var randomHeight = randomService.Next(MinHazardHeight, MaxHazardHeight); AssertAreApproximatelyEqual(hazard.Height, randomHeight, 0.01f); } }
Hazard HazardFactory() { return(new Hazard(randomService.Next(minHazardHeight, maxHazardHeight), initialPosition, hazardSpeed, time)); }