Ejemplo n.º 1
0
        public void TestGetRngInstanceAt_ArgumentOutOfBounds()
        {
            StealFutureRng future = new StealFutureRng();

            future.AddNextRngInstance(GetStealFutureRngInstance());
            future.AddNextRngInstance(GetStealFutureRngInstance());
            Assert.ThrowsException <ArgumentOutOfRangeException>(
                delegate
            {
                future.GetRngInstanceAt(2);
            }
                );
        }
Ejemplo n.º 2
0
        public void TestGetRngInstanceAt()
        {
            StealFutureRng future = new StealFutureRng();

            future.AddNextRngInstance(GetStealFutureRngInstance());
            future.AddNextRngInstance(GetStealFutureRngInstance());
            StealFutureRngInstance instance = GetStealFutureRngInstance();

            instance.Lv99RedChocobo = true;
            instance.NormalReward   = StealType.Rare;

            future.AddNextRngInstance(instance);
            StealFutureRngInstance copy = future.GetRngInstanceAt(2);

            Assert.AreEqual(instance.Lv99RedChocobo, copy.Lv99RedChocobo);
            Assert.AreEqual(instance.NormalReward, copy.NormalReward);
        }
Ejemplo n.º 3
0
        private void UpdateDataGridView()
        {
            int positionsCalculated = _futureRng.GetTotalFutureRngPositions();

            for (int i = 0; i < positionsCalculated; i++)
            {
                StealFutureRngInstance rngInstance = _futureRng.GetRngInstanceAt(i);
                int             rowNumber          = dataGridView.Rows.Add();
                DataGridViewRow row = dataGridView.Rows[rowNumber];

                UpdateRowInfo(rngInstance, row);

                if (rngInstance.IsPastRng)
                {
                    row.DefaultCellStyle.BackColor = Color.LightGreen;
                }
            }
        }