Пример #1
0
        public void GenerateWorks(int value, string expected)
        {
            // Arrange
            var random = new Mock <IRandomNumber>();

            random.Setup(x => x.Next(0, 1)).Returns(value);

            var sut = new BitGenerator(random.Object);

            // Act
            var result = sut.Generate();

            // assert
            Assert.Equal(expected, result);
        }
Пример #2
0
    // Use this for initialization
    void Start()
    {
        //platformWidth = thePlatform.GetComponent<BoxCollider2D> ().size.x;

        platformWidths = new float[theObjectPools.Length];

        for (int i = 0; i < theObjectPools.Length; i++)
        {
            platformWidths[i] = theObjectPools[i].pooledObject.GetComponent <BoxCollider2D>().size.x;
        }

        minHeight = transform.position.y;
        maxHeight = maxHeightPoint.position.y;

        theBitGenerator = FindObjectOfType <BitGenerator>();
    }
Пример #3
0
 public Random(UInt32 x, UInt32 bitRegister = 1)
 {
     this.x        = x;
     _bitGenerator = new GRand(bitRegister);
 }
Пример #4
0
 public Random()
 {
     _bitGenerator = new GRand();
 }
 public RandomPopulationGenerator(BitGenerator generator)
 {
     _generator = generator;
 }