コード例 #1
0
ファイル: MissionBoard.cs プロジェクト: kirisky/DragonTrainer
        public bool PerformTheMission()
        {
            var mission = _warrior.ChooseTheBestMission(_missions, _userInfo);

            if (mission == null)
            {
                return(false);
            }

            var missionResult = _warrior.PerformTheMission(
                _missionService, _userInfo.GameId, mission.AdId
                );

            _userInfo.Lives             = missionResult.Lives;
            _userInfo.Gold              = missionResult.Gold;
            _userInfo.Score             = missionResult.Score;
            _userInfo.HighestScore      = missionResult.HighScore;
            _userInfo.Turn              = missionResult.Turn;
            _userInfo.LastMissionResult = missionResult.Success;
            _userInfo.TurnsInARound    += 1;

            return(_userInfo.LastMissionResult);
        }