public void TestRawNumberGenerationQuantity() { // Checking the size of the whole number list from the // range of min to max. var numberPool = new NumberPool(0, 9999); var rawNumbers = numberPool.GetRawNumberPool(); int expectedSize = 10000; int actualSize = rawNumbers.Count; Assert.AreEqual(expectedSize, actualSize); }
public void TestSortedNumberGenerationQuantity() { // Checking the size of sorted list which consists of // numbers following given conditions strictly. var numberPool = new NumberPool(0, 9999); var rawNumbers = numberPool.GetRawNumberPool(); var sortedNumbers = numberPool.GetSortedNumberPool(rawNumbers); int expectedSize = 7153; int actualSize = sortedNumbers.Count; Assert.AreEqual(expectedSize, actualSize); }
public void TestPINGenerationQuantity() { // Checking total number of PINs will be created per batch. var numberPool = new NumberPool(0, 9999); var rawNumbers = numberPool.GetRawNumberPool(); var sortedNumbers = numberPool.GetSortedNumberPool(rawNumbers); var pinGenerator = new PINGenerator(sortedNumbers); var pinBatch = pinGenerator.GetNewBatch(); int expectedSize = 1000; int actualSize = pinBatch.Count; Assert.AreEqual(expectedSize, actualSize); }
/// <summary> /// Performs a cheating action. /// </summary> /// <param name="number">The number between 40 and 140 entered by another player.</param> public void CheatingAction(int number) => NumberPool.RemoveAll(x => x == number);
public void SetInstance() { inst = this; }
// Use this for initialization void Start() { initializeBoard(); numberPool = FindObjectOfType<NumberPool>(); numberPool.GenerateNumberPool(BoardSize * 10); }
protected override void Start() { base.Start(); numberPool = FindObjectOfType<NumberPool>(); MyValue = numberPool.GetNextNumber(); }