public NewGameController(ISaveGameRepository saveGameRepository, IAsciiArtRepository asciiArtRepository, IStatsGenerator statsGenerator, GameWorld gameWorld) { _saveGameRepository = saveGameRepository; _asciiArtRepository = asciiArtRepository; _statsGenerator = statsGenerator; _gameWorld = gameWorld; }
public AbilitiesGenerator(IStatsGenerator statsGenerator, ILanguageGenerator languageGenerator, ISkillsGenerator skillsGenerator, IFeatsGenerator featsGenerator, ICollectionsSelector collectionsSelector) { this.statsGenerator = statsGenerator; this.languageGenerator = languageGenerator; this.skillsGenerator = skillsGenerator; this.featsGenerator = featsGenerator; this.collectionsSelector = collectionsSelector; }
public MonsterFactory(IWeaponFactory weaponFactory, ISpellFactory spellFactory, IItemFactory itemFactory, IMonsterDataRepository monsterDataRepository, IActionSelector actionSelector, IStatsGenerator statsGenerator, IDice dice) { this.weaponFactory = weaponFactory; this.spellFactory = spellFactory; this.itemFactory = itemFactory; _actionSelector = actionSelector; _statsGenerator = statsGenerator; _dice = dice; monsterArchetypes = monsterDataRepository.GetAllMonsterArchetypes().ToList(); monsterModifiers = monsterDataRepository.GetAllMonsterModifiers().ToList(); }
public void Setup() { mockStatAdjustmentsSelector = new Mock<IStatAdjustmentsSelector>(); mockBooleanPercentileSelector = new Mock<IBooleanPercentileSelector>(); mockAdjustmentsSelector = new Mock<IAdjustmentsSelector>(); mockCollectionsSelector = new Mock<ICollectionsSelector>(); statsGenerator = new StatsGenerator(mockBooleanPercentileSelector.Object, mockStatAdjustmentsSelector.Object, mockAdjustmentsSelector.Object, mockCollectionsSelector.Object); mockStatsRandomizer = new Mock<IStatsRandomizer>(); mockSetStatsRandomizer = new Mock<ISetStatsRandomizer>(); randomizedStats = new Dictionary<string, Stat>(); race = new Race(); adjustments = new Dictionary<string, int>(); characterClass = new CharacterClass(); undead = new List<string>(); statPriorities = new List<string>(); characterClass.Name = "class name"; characterClass.Level = 1; race.BaseRace = "base race"; race.Metarace = "metarace"; randomizedStats[StatConstants.Charisma] = new Stat(StatConstants.Charisma); randomizedStats[StatConstants.Constitution] = new Stat(StatConstants.Constitution); randomizedStats[StatConstants.Dexterity] = new Stat(StatConstants.Dexterity); randomizedStats[StatConstants.Intelligence] = new Stat(StatConstants.Intelligence); randomizedStats[StatConstants.Strength] = new Stat(StatConstants.Strength); randomizedStats[StatConstants.Wisdom] = new Stat(StatConstants.Wisdom); statPriorities.Add(StatConstants.Strength); statPriorities.Add(StatConstants.Wisdom); adjustments[StatConstants.Charisma] = 0; adjustments[StatConstants.Constitution] = 0; adjustments[StatConstants.Dexterity] = 0; adjustments[StatConstants.Intelligence] = 0; adjustments[StatConstants.Strength] = 0; adjustments[StatConstants.Wisdom] = 0; mockSetStatsRandomizer.SetupAllProperties(); mockStatAdjustmentsSelector.Setup(p => p.SelectFor(race)).Returns(adjustments); mockStatsRandomizer.Setup(r => r.Randomize()).Returns(randomizedStats); mockSetStatsRandomizer.Setup(r => r.Randomize()).Returns(randomizedStats); mockCollectionsSelector.Setup(s => s.SelectFrom(TableNameConstants.Set.Collection.MetaraceGroups, GroupConstants.Undead)).Returns(undead); mockCollectionsSelector.Setup(s => s.SelectFrom(TableNameConstants.Set.Collection.StatPriorities, characterClass.Name)).Returns(statPriorities); mockCollectionsSelector.Setup(s => s.SelectRandomFrom(It.IsAny<IEnumerable<string>>())).Returns((IEnumerable<string> c) => c.Last()); }