Exemplo n.º 1
0
        public void TestGetTotalFutureRngPositions()
        {
            ChestFutureRng future = new ChestFutureRng();

            Assert.AreEqual(0, future.GetTotalFutureRngPositions());
            future.AddNextRngInstance(GetChestFutureRngInstance());
            Assert.AreEqual(1, future.GetTotalFutureRngPositions());
            future.AddNextRngInstance(GetChestFutureRngInstance());
            Assert.AreEqual(2, future.GetTotalFutureRngPositions());
        }
Exemplo n.º 2
0
        private void UpdateDataGridView()
        {
            int positionsCalculated = _futureRng.GetTotalFutureRngPositions();

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

                UpdateRowStandardInfo(rngInstance, row);
                UpdateRowChestInfo(rngInstance, row);

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