Exemplo n.º 1
0
        private void Add(string location, Thing thing)
        {
            if (locationMap[location] == null)
            {
                locationMap.Add(location);
            }

            locationMap[location].Add(thing);
        }
Exemplo n.º 2
0
        public InventoryHash Clone()
        {
            InventoryHash output = new InventoryHash();

            foreach (string key in innerHash.Keys)
            {
                output.Add(key);
                List <Thing> things = (List <Thing>)innerHash[key];

                foreach (Thing thing in things)
                {
                    Thing newThing = thing.Clone();
                    output[key].Add(newThing);
                }
            }

            return(output);
        }
Exemplo n.º 3
0
        public InventoryHash Clone()
        {
            InventoryHash output = new InventoryHash();

            foreach (Inventory inventory in this.InnerHash.Keys)
            {
                output.Add(inventory.Name);
                List <Thing> things = (List <Thing>) this.InnerHash[inventory];

                foreach (Thing thing in things)
                {
                    Thing newThing = thing.Clone();
                    output[inventory.Name].Add(newThing);
                }
            }

            return(output);
        }
Exemplo n.º 4
0
        public InventoryHash Clone()
        {
            InventoryHash output = new InventoryHash();

            foreach (string key in innerHash.Keys)
            {
                output.Add(key);
                List<Thing> things = (List<Thing>)innerHash[key];

                foreach (Thing thing in things)
                {
                    Thing newThing = thing.Clone();
                    output[key].Add(newThing);
                }
            }

            return output;
        }