Ejemplo n.º 1
0
        private void UpdateAdvanceData()
        {
            AdvanceDirections directions1 = _futureRng.GetAdvanceDirectionsAtIndex(0);

            tbAppear1.Text = FormUtils.ConvertDirectionsToText(directions1.AdvanceToAppear);
            tbItem1.Text   = FormUtils.ConvertDirectionsToText(directions1.AdvanceForItem);

            AdvanceDirections directions2 = _futureRng.GetAdvanceDirectionsAtIndex(1);

            tbAppear2.Text = FormUtils.ConvertDirectionsToText(directions2.AdvanceToAppear);
            tbItem2.Text   = FormUtils.ConvertDirectionsToText(directions2.AdvanceForItem);
        }
Ejemplo n.º 2
0
        public void TestGetAdvanceDirectionsAt_ArgumentOutOfBounds()
        {
            ChestFutureRng future = new ChestFutureRng();

            future.AddAdvanceDirections(GetAdvanceDirections());
            future.AddAdvanceDirections(GetAdvanceDirections());
            future.AddAdvanceDirections(GetAdvanceDirections());
            Assert.ThrowsException <ArgumentOutOfRangeException>(
                delegate
            {
                future.GetAdvanceDirectionsAtIndex(3);
            });
        }
Ejemplo n.º 3
0
        public void TestGetAdvanceDirectionsAt()
        {
            ChestFutureRng future = new ChestFutureRng();

            future.AddAdvanceDirections(GetAdvanceDirections());
            future.AddAdvanceDirections(GetAdvanceDirections());
            future.AddAdvanceDirections(GetAdvanceDirections());
            AdvanceDirections directions = GetAdvanceDirections();

            directions.AdvanceForItem  = 7;
            directions.AdvanceToAppear = 24;

            future.AddAdvanceDirections(directions);
            AdvanceDirections copy = future.GetAdvanceDirectionsAtIndex(3);

            Assert.AreEqual(directions.AdvanceForItem, copy.AdvanceForItem);
            Assert.AreEqual(directions.AdvanceToAppear, copy.AdvanceToAppear);
        }