Exemplo n.º 1
0
        public void Remove()
        {
            var removeMap   = new List <Cell>();
            var removeWorld = new CellWorld();

            var r = new Random();

            for (var i = 0; i < 1000; i++)
            {
                var index = r.Next(_testMap.Count);
                removeWorld[_testMap[index].X, _testMap[index].Y] = true;
                removeMap.Add(_testMap[index]);
                _testMap.RemoveAt(index);
            }

            _world = _world.Remove(removeWorld);

            foreach (var position in _testMap)
            {
                Assert.IsTrue(_world[position.X, position.Y]);
            }
            foreach (var position in removeMap)
            {
                Assert.IsFalse(_world[position.X, position.Y]);
            }
        }