Ejemplo n.º 1
0
    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);
        }
    }
Ejemplo n.º 2
0
 Hazard HazardFactory()
 {
     return(new Hazard(randomService.Next(minHazardHeight, maxHazardHeight), initialPosition, hazardSpeed, time));
 }