예제 #1
0
        public void TestConsumeNextNRngPositions()
        {
            StealRngHelper helper = GetDefaultHelper();

            helper.FindFirstRngPosition(94);
            helper.FindNextRngPosition(89);
            Assert.IsTrue(helper.ConsumeNextNRngPositions(10));
            helper.FindNextRngPosition(95);
            helper.CalculateRng(100);
            Assert.AreEqual(94, helper.GetNextExpectedHealValue());
        }
예제 #2
0
        private void btnConsume_Click(object sender, EventArgs e)
        {
            int consume;

            int.TryParse(tbConsume.Text, out consume);

            DateTime begint = DateTime.Now;

            _rngHelper.ConsumeNextNRngPositions(consume);
            DateTime endt = DateTime.Now;

            toolStripStatusLabelPercent.Text = (endt - begint).ToString();

            int numRows = FormUtils.ParseNumRows(tbNumRows.Text);

            _rngHelper.CalculateRng(numRows);
            DisplayFutureRng();
        }