Ejemplo n.º 1
0
        public void RemoveTest()
        {
            var world = new World(_tileTypes, new DateTime());

            var seed    = 123123;
            var random0 = new Random(seed);

            for (int i = 0; i < 10000; i++)
            {
                var tile = RandomTile(random0, World.MinGridPosition, World.MaxGridPosition);
                world.AddTile(tile);
            }

            var random1 = new Random(seed);

            for (int i = 0; i < 10000; i++)
            {
                var tile = RandomTile(random1, World.MinGridPosition, World.MaxGridPosition);
                world.Remove(tile.BaseData);
            }

            Assert.AreEqual(0, world.TileCount);
        }