Beispiel #1
0
        private static void Main(string[] args)
        {
            var hhInventory = new HandHeldInventory(
                new HandHeldInventoryItem("Shield", HandHeldInventoryItem.Right),
                new HandHeldInventoryItem("Axe", HandHeldInventoryItem.Left)
                );

            var hhInventoryIterator = hhInventory.GetIterator();

            PrintInventoryItems(hhInventoryIterator);

            var bbInventory = new BackBackInventory(new[]
            {
                new InventoryItem("Map"),
                new InventoryItem("Rope"),
                new InventoryItem("Water")
            });

            var bbInventoryIterator = bbInventory.GetIterator();

            PrintInventoryItems(bbInventoryIterator);
        }
 public BackBackInventoryIterator(BackBackInventory inventory)
 {
     this._index     = 0;
     this._inventory = inventory;
 }