Пример #1
0
        public void TestGetTotalFutureRngPositions()
        {
            SpawnFutureRng future = new SpawnFutureRng();

            Assert.AreEqual(0, future.GetTotalFutureRngPositions());
            future.AddNextRngInstance(GetSpawnFutureRngInstance());
            Assert.AreEqual(1, future.GetTotalFutureRngPositions());
            future.AddNextRngInstance(GetSpawnFutureRngInstance());
            Assert.AreEqual(2, future.GetTotalFutureRngPositions());
        }
Пример #2
0
        private void UpdateDataGridView()
        {
            int positionsCalculated = _futureRng.GetTotalFutureRngPositions();

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

                UpdateRowInfo(rngInstance, row);
                UpdateRowColor(rngInstance, row);

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