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); }
// 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>(); }
public Random(UInt32 x, UInt32 bitRegister = 1) { this.x = x; _bitGenerator = new GRand(bitRegister); }
public Random() { _bitGenerator = new GRand(); }
public RandomPopulationGenerator(BitGenerator generator) { _generator = generator; }