public override bool visitContains(MapItemIterator mapItemIterator, IGameObject gameObject) { MapItemRepository repository = mapItemIterator.GetMapItemRepository(); bool contains = false; while (!mapItemIterator.IsDone()) { if (gameObject == (IGameObject)mapItemIterator.CurrentItem()) { contains = true; } mapItemIterator.Next(); } return(contains); }
public override IGameObject visitLast(MapItemIterator mapItemIterator) { if (mapItemIterator == null) { } MapItemRepository repository = mapItemIterator.GetMapItemRepository(); IGameObject lastItem = null; while (!mapItemIterator.IsDone()) { lastItem = (IGameObject)mapItemIterator.CurrentItem(); mapItemIterator.Next(); } return(lastItem); }