Exemplo n.º 1
0
 public StoryMaker(IRoomFactory roomFactory,
                   IMonsterFactory monsterFactory,
                   ILootFactory lootFactory)
 {
     _roomFactory    = roomFactory;
     _monsterFactory = monsterFactory;
     _lootFactory    = lootFactory;
 }
Exemplo n.º 2
0
        public StoryElements(IMonsterFactory monsterFactory, ILootFactory lootFactory, IRoomFactory roomFactory)
        {
            if (monsterFactory == null)
            {
                throw new ArgumentNullException("A monsterFactory must be supplied");
            }

            if (lootFactory == null)
            {
                throw new ArgumentNullException("A lootFactory must be supplied");
            }

            if (roomFactory == null)
            {
                throw new ArgumentNullException("A roomFactory must be supplied");
            }

            this.monsterFactory = monsterFactory;
            this.lootFactory    = lootFactory;
            this.roomFactory    = roomFactory;
        }