Esempio n. 1
0
        public void SetUp()
        {
            this.logger = new ActionLog();
            GlobalConstants.ActionLog = this.logger;

            this.target = new CombatEngine(Mock.Of <IRollable>(
                                               roller => roller.RollSuccesses(
                                                   It.IsAny <int>(),
                                                   It.IsIn <int>(7)) == 1 &&
                                               roller.RollSuccesses(
                                                   It.IsAny <int>(),
                                                   It.IsNotIn(7)) == 2));
            this.statisticHandler    = new EntityStatisticHandler();
            this.skillHandler        = new EntitySkillHandler();
            this.derivedValueHandler = new DerivedValueHandler(this.statisticHandler, this.skillHandler);
            this.abilityHandler      = new AbilityHandler();

            this.materialHandler = new MaterialHandler();

            this.objectIconHandler = new ObjectIconHandler(new RNG());

            this.itemHandler = new LiveItemHandler(new RNG());

            GlobalConstants.GameManager = Mock.Of <IGameManager>(
                manager => manager.ItemHandler == this.itemHandler &&
                manager.ObjectIconHandler == this.objectIconHandler);

            this.needHandler = new NeedHandler();
        }
Esempio n. 2
0
 public CombatController(GameWorld gameWorld, ICombatEngine combatEngine, IAsciiArtRepository asciiArtRepository)
 {
     _gameWorld = gameWorld;
     _combatEngine = combatEngine;
     _combatSteps = _combatEngine.GetSteps().GetEnumerator();
     _asciiArtRepository = asciiArtRepository;
 }
Esempio n. 3
0
 public GameEngine(ICombatEngine combatEngine, IRepository <Dungeon> dungeonRepository, IDungeonFactory dungeonFactory)
 {
     this.combatEngine      = combatEngine;
     this.dungeonRepository = dungeonRepository;
     this.dungeonFactory    = dungeonFactory;
 }