Beispiel #1
0
 private void UpdateDirectionsData()
 {
     tbAppear1.Text = FormUtils.ConvertDirectionsToText(
         _futureRng.GetSpawnDirectionsAtIndex(0).Directions);
     tbAppear2.Text = FormUtils.ConvertDirectionsToText(
         _futureRng.GetSpawnDirectionsAtIndex(1).Directions);
     tbAppear12.Text = ConvertNBeforeMDirectionToText(
         _futureRng.GetStepsToLastNSpawnBeforeMSpawn(0, 1));
 }
Beispiel #2
0
        public void TestGetSpawnDirectionsAt_ArgumentOutOfBounds()
        {
            SpawnFutureRng future = new SpawnFutureRng();

            future.AddSpawnDirections(GetSpawnDirections());
            future.AddSpawnDirections(GetSpawnDirections());
            future.AddSpawnDirections(GetSpawnDirections());
            Assert.ThrowsException <ArgumentOutOfRangeException>(
                delegate
            {
                future.GetSpawnDirectionsAtIndex(3);
            });
        }
Beispiel #3
0
        public void TestGetSpawnDirectionsAt()
        {
            SpawnFutureRng future = new SpawnFutureRng();

            future.AddSpawnDirections(GetSpawnDirections());
            future.AddSpawnDirections(GetSpawnDirections());
            future.AddSpawnDirections(GetSpawnDirections());
            SpawnDirections directions = GetSpawnDirections();

            directions.Directions = 7;

            future.AddSpawnDirections(directions);
            SpawnDirections copy = future.GetSpawnDirectionsAtIndex(3);

            Assert.AreEqual(directions.Directions, copy.Directions);
        }