예제 #1
0
        public TeamsInfoViewModel(
            ITeamService teamService,
            ITeamFactory teamFactory,
            IStateService stateService)
        {
            _teamFactory  = teamFactory;
            _teamService  = teamService;
            _stateService = stateService;

            ActionBarViewModel = ViewModelLocator.Resolve <ModeActionBarViewModel>();
            ActionBarViewModel.InitializeAsync(this);
            ((ModeActionBarViewModel)ActionBarViewModel).IsModesAvailable = false;

            AddMemberToTeamPopupViewModel = ViewModelLocator.Resolve <AddMemberToTeamPopupViewModel>();
            AddMemberToTeamPopupViewModel.InitializeAsync(this);

            AppBackgroundImage = GlobalSettings.Instance.UserProfile.AppBackgroundImage?.Url;

            RefreshCommand = new Command(async() => {
                IsRefreshing = true;

                await GetTeamByIdAsync(TargetTeam.Id);
                await GetTeamRequestsAsync(TargetTeam);

                await Task.Delay(AppConsts.DELAY_STUB);

                IsRefreshing = false;
            });
        }
예제 #2
0
 public BattlefieldFactory(ITeamFactory teamFactory, GroupingFactory groupingFactory, IMenuFactory menuFactory, IChanceService chanceService)
 {
     _teamFactory     = teamFactory;
     _groupingFactory = groupingFactory;
     _menuFactory     = menuFactory;
     _chanceService   = chanceService;
 }
예제 #3
0
        public RegionManager(
            IRegionFactory regionFactory,
            IMapManager mapManager,
            ITeamFactory teamFactory,
            IMenuFactory menuFactory,
            IDecisionManager decisionManager,
            BattlefieldFactory battlefieldFactory,
            IInput input,
            IOutput output,
            IChanceService chanceService)
        {
            _mapManager         = mapManager;
            _teamFactory        = teamFactory;
            _decisionManager    = decisionManager;
            _menuFactory        = menuFactory;
            _battlefieldFactory = battlefieldFactory;

            _input         = input;
            _output        = output;
            _chanceService = chanceService;

            IEnumerable <WorldRegion> allRegionEnums = EnumHelperMethods.GetAllValuesForEnum <WorldRegion>();
            IEnumerable <Region>      allRegions     = regionFactory.GetRegions(allRegionEnums);

            _regionalMap = mapManager.GetRegionalMap(allRegions.ToArray());
        }
 public Network(IEnumerable <IProgrammer> programmers, IDegreesOfSeparationFactory degreesOfSeparationFactory, ITeamFactory teamFactory, IRankCalculatorFactory rankCalculatorFactory)
 {
     _programmers         = programmers;
     _degreesOfSeparation = degreesOfSeparationFactory.BuildDegreesOfSeparation(_programmers);
     _teamFactory         = teamFactory;
     _rankCalculator      = rankCalculatorFactory.BuildRankCalculator();
     _rankCalculator.Calculate(_programmers);
 }
예제 #5
0
 /// <summary>
 ///     ctor().
 /// </summary>
 public TeamService(
     IRequestProvider requestProvider,
     IIdentityUtilService identityUtilService,
     ITeamFactory teamFactory,
     IProfileFactory profileFactory)
 {
     _requestProvider     = requestProvider;
     _identityUtilService = identityUtilService;
     _teamFactory         = teamFactory;
     _profileFactory      = profileFactory;
 }
예제 #6
0
 public TournamentController(
     ITeamFactory teamFactory,
     IGameSimulator gameSimulator,
     ITournamentHandler tournamentHandler,
     ITournamentView tournamentView)
 {
     _teamFactory       = teamFactory;
     _gameSimulator     = gameSimulator;
     _tournamentHandler = tournamentHandler;
     _tournamentView    = tournamentView;
 }
예제 #7
0
        public ShiftManager(ITeamFactory teamFactory, ITimeProvider timeProvider, ILogger <ShiftManager> logger)
        {
            _teams[TeamType.Daily]    = teamFactory.CreateTeam(TeamType.Daily);
            _teams[TeamType.Evening]  = teamFactory.CreateTeam(TeamType.Evening);
            _teams[TeamType.Nightly]  = teamFactory.CreateTeam(TeamType.Nightly);
            _teams[TeamType.Overflow] = teamFactory.CreateTeam(TeamType.Overflow);
            _timeProvider             = timeProvider;
            _logger     = logger;
            _shiftTimer = new Timer(ShiftTeams);

            SetShiftTimer();
        }
예제 #8
0
        public AddTeamPopupViewModel(
            ITeamService teamService,
            IValidationObjectFactory validationObjectFactory,
            ISportService sportService,
            ISportsFactory sportsFactory,
            ITeamFactory teamFactory)
        {
            _teamService             = teamService;
            _validationObjectFactory = validationObjectFactory;
            _sportService            = sportService;
            _sportsFactory           = sportsFactory;
            _teamFactory             = teamFactory;

            ResetValidationObjects();
        }
예제 #9
0
 public MatchController(
     IMatchSimulatorService matchSimulatorService,
     IMatchGeneratorService matchGeneratorService,
     ITeamGeneratorService teamGeneratorService,
     IPoolFinalizeService poolFinalizeService,
     ITeamFactory teamFactory,
     IPlayerFactory playerFactory,
     IMatchOverViewMapper matchOverViewMapper,
     IPoolModelMapper PoolOverViewMapper)
 {
     _matchSimulatorService = matchSimulatorService;
     _matchGeneratorService = matchGeneratorService;
     _teamGeneratorService  = teamGeneratorService;
     _poolFinalizeService   = poolFinalizeService;
     _teamFactory           = teamFactory;
     _playerFactory         = playerFactory;
     _matchOverViewMapper   = matchOverViewMapper;
     _PoolOverViewMapper    = PoolOverViewMapper;
 }
예제 #10
0
 public GroupingFactory(IChanceService chanceService, ITeamFactory teamFactory, FighterFactory fighterFactory)
 {
     _chanceService  = chanceService;
     _teamFactory    = teamFactory;
     _fighterFactory = fighterFactory;
 }
예제 #11
0
 public TeamService(ITeamFactory teamFactory, ILogger <TeamService> logger)
 {
     _teamFactory = teamFactory;
     _logger      = logger;
 }
예제 #12
0
 public MafiaGameBuilder(ITeamFactory teamFactory)
 {
     _teamFactory = teamFactory;
 }
예제 #13
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="CreateTeamRequestHandler" /> class.
 /// </summary>
 /// <param name="teamFactory">The team factory.</param>
 public CreateTeamRequestHandler(ITeamFactory teamFactory)
 {
     _teamFactory = teamFactory;
 }
예제 #14
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CreateTeamRequestHandler" /> class.
 /// </summary>
 /// <param name="teamFactory">The team factory.</param>
 /// <param name="organizationRepository">The organization repository.</param>
 public CreateTeamRequestHandler(ITeamFactory teamFactory, IOrganizationRepository organizationRepository)
 {
     _teamFactory            = teamFactory;
     _organizationRepository = organizationRepository;
 }