Ejemplo n.º 1
0
 protected override void TearDown()
 {
     base.TearDown();
     turnEvent  = null;
     mockStatus = null;
     mockGun    = null;
 }
Ejemplo n.º 2
0
 protected override void Setup()
 {
     base.Setup();
     turnEvent  = new ActionEvent();
     mockGun    = new MockGunStatus();
     mockPlayer = new MockPlayer();
     mockStatus = new MockPlayerStatus()
     {
         MainHand   = mockGun,
         PlayerBase = mockPlayer
     };
 }
Ejemplo n.º 3
0
        protected override void Setup()
        {
            turnState = new MockTurnState()
            {
                ReturnExecute = states
            };

            factory = new MockTurnStateFactory()
            {
                ReturnState = turnState
            };

            stateMachine = new TurnStateMachine(factory);
            player       = new Player(always10, 11, 11, FightingStyle.Archery, mh, ohs, feats, buffs);
            status       = new MockPlayerStatus();
            enemy        = new Enemy(14);
        }
Ejemplo n.º 4
0
        public TurnStateEnum Execute(IPlayerStatus player, IEnemy enemy)
        {
            if (ReturnExecute[current] == TurnStateEnum.End)
            {
                MockPlayerStatus mockPlayer = (MockPlayerStatus)player;
                mockPlayer.NumberOfTurnsPassed++;
                TurnComplete = true;
            }
            else
            {
                TurnComplete = false;
            }

            TurnStateEnum next = GetNext();

            return(next);
        }