Пример #1
0
 public UserBP(IPlayerStore playerStore, ISportStore sportStore)
 {
     if (playerStore == null) throw new ArgumentNullException("playerStore");
     if (sportStore == null) throw new ArgumentNullException("sportStore");
     _playerStore = playerStore;
     _sportStore = sportStore;
 }
Пример #2
0
 protected override PurchaseHealingCommandHandler CreateSutImpl(
     IPlayerStore playerStore,
     IRandom random,
     IOptions <PurchaseHealingOptions> opts)
 {
     return(new PurchaseHealingCommandHandler(playerStore, random, opts));
 }
Пример #3
0
 public GameController(
     ICommandDispatcher dispatcher,
     IPlayerStore playerStore)
 {
     _dispatcher  = dispatcher;
     _playerStore = playerStore;
 }
Пример #4
0
        private static NewGameCommandHandler CreateSut(IPlayerStore playerStore, InitialPlayerStats options)
        {
            var optionsSnapshot = Substitute.For <IOptionsSnapshot <InitialPlayerStats> >();

            optionsSnapshot.Value.Returns(options);

            return(new NewGameCommandHandler(playerStore, optionsSnapshot));
        }
Пример #5
0
 public NewGameCommandHandler(
     IPlayerStore playerStore,
     IOptions <InitialPlayerStats> options
     )
 {
     _playerStore = playerStore;
     _options     = options.Value;
 }
Пример #6
0
 public GameHub(
     IGroupStore groupStore,
     IPlayerStore playerStore,
     IGameEngineService gameEngineService)
 {
     _groupStore        = groupStore ?? throw new ArgumentNullException(nameof(groupStore));
     _playerStore       = playerStore ?? throw new ArgumentNullException(nameof(playerStore));
     _gameEngineService = gameEngineService ?? throw new ArgumentNullException(nameof(gameEngineService));
 }
Пример #7
0
 public AppHub(
     ILogger <AppHub> logger,
     IMapper mapper,
     IPlayerStore playerStore
     )
 {
     Logger      = logger;
     PlayerStore = playerStore;
     Mapper      = mapper;
 }
Пример #8
0
 public AttackCommandHandler(
     IPlayerStore playerStore,
     IRandom random,
     IFormulaCalculator calculator,
     IOptions <AttackOptions> options)
     : base(playerStore, random)
 {
     _calculator = calculator;
     _options    = options.Value;
 }
Пример #9
0
        public Database(string accountConnection, IAccountStore accountStore,
                        string playerConnection, IPlayerStore playerStore,
                        string guildConnection, IGuildStore guildStore)
        {
            _accountStore = accountStore;
            _playerStore  = playerStore;
            _guildStore   = guildStore;

            _accountStore.Connect(accountConnection);
            _playerStore.Connect(playerConnection);
            _guildStore.Connect(guildConnection);
        }
Пример #10
0
        public MatchBP(IMatchStore matchStore, IPlayerStore playerStore, ITeamStore teamStore, ISportStore sportStore)
        {
            if (matchStore == null) throw new ArgumentNullException("matchStore");
            if (playerStore == null) throw new ArgumentNullException("playerStore");
            if (teamStore == null) throw new ArgumentNullException("teamStore");
            if (sportStore == null) throw new ArgumentNullException("sportStore");

            _matchStore = matchStore;
            _playerStore = playerStore;
            _teamStore = teamStore;
            _sportStore = sportStore;
        }
Пример #11
0
        public TournamentBP(IPlayerStore playerStore, ITeamStore teamStore, ISportStore sportStore, ITournamentStore tournamentStore, ITournamentSystemFactory tournamentSystemFactory)
        {
            if (playerStore == null) throw new ArgumentNullException("playerStore");
            if (teamStore == null) throw new ArgumentNullException("teamStore");
            if (sportStore == null) throw new ArgumentNullException("sportStore");
            if (tournamentSystemFactory == null) throw new ArgumentNullException("tournamentSystemFactory");

            _playerStore = playerStore;
            _teamStore = teamStore;
            _sportStore = sportStore;
            _tournamentStore = tournamentStore;
            _tournamentSystemFactory = tournamentSystemFactory;
        }
Пример #12
0
 public PlayerService(
     IPlayerStore store,
     IGameStore gameStore,
     IMapper mapper,
     IMemoryCache localCache,
     ITopoMojoApiClient mojo
     )
 {
     Store      = store;
     GameStore  = gameStore;
     Mapper     = mapper;
     LocalCache = localCache;
     Mojo       = mojo;
 }
Пример #13
0
 public BotCommandHandler(
     IPlayerStore playerStore,
     IRandom random,
     IFormulaCalculator calculator,
     IOptions <AttackOptions> attackOptions,
     IOptions <PurchaseWeaponOptions> purchaseWeaponOptions,
     IOptions <PurchaseHealingOptions> purchaseHealingOptions
     ) : base(playerStore, random)
 {
     _calculator    = calculator;
     _attackOptions = attackOptions.Value;
     _purchaseWeaponHandlerOptions  = purchaseWeaponOptions.Value;
     _purchaseHealingHandlerOptions = purchaseHealingOptions.Value;
 }
Пример #14
0
        private THandler CreateSut(
            Player player            = null,
            IPlayerStore playerStore = null,
            IRandom random           = null,
            TOptions options         = null)
        {
            player      = player ?? PlayerFixture.CreateDefaultPlayer();
            playerStore = playerStore ?? Substitute.For <IPlayerStore>();
            playerStore.GetPlayer().Returns(player);
            random = random ?? Substitute.For <IRandom>();
            var opts = Substitute.For <IOptions <TOptions> >();

            opts.Value.Returns(options ?? new TOptions());

            return(CreateSutImpl(playerStore, random, opts));
        }
Пример #15
0
        private static AttackCommandHandler CreateSut(
            Player player                 = null,
            IPlayerStore playerStore      = null,
            IRandom random                = null,
            IFormulaCalculator calculator = null,
            AttackOptions options         = null)
        {
            player      = player ?? PlayerFixture.CreateDefaultPlayer();
            playerStore = playerStore ?? Substitute.For <IPlayerStore>();
            playerStore.GetPlayer().Returns(player);
            random     = random ?? Substitute.For <IRandom>();
            calculator = calculator ?? Substitute.For <IFormulaCalculator>();

            var optionsSnapshot = Substitute.For <IOptionsSnapshot <AttackOptions> >();

            optionsSnapshot.Value.Returns(options ?? new AttackOptions());

            return(new AttackCommandHandler(playerStore, random, calculator, optionsSnapshot));
        }
 public LinePlayerJoinDecorator(ILogLineEventConverter component, IPlayerStore playerStore)
 {
     _component = component;
     _players   = playerStore.GetPlayers();
 }
Пример #17
0
 public PurchaseArmorCommandHandler(
     IPlayerStore playerStore,
     IRandom random,
     IOptions <PurchaseArmorOptions> options
     ) : base(playerStore, random) => _options = options.Value;
Пример #18
0
 public Player(IPlayerStore storage, ILogger <PlayerMiddleware> logger)
 {
     _storage = storage;
     _logger  = logger;
 }
Пример #19
0
 protected PlayerCommandHandlerBase(IPlayerStore playerStore, IRandom random)
 {
     PlayerStore = playerStore;
     Random      = random;
 }
Пример #20
0
 public PlayerAnalyzer(IPlayerStore playerStore)
 {
     _playerStore = playerStore;
 }
 public PlayerController(IPlayerStore playerStore)
 {
     _playerStore = playerStore;
 }
Пример #22
0
 private void Awake()
 {
     _playerStore    = FindObjectOfType <PlayerStore>();
     _visionObserver =
         FindObjectOfType <VisionStore>().GetVisionObserver(_playerStore.PlayerUnit);
 }
Пример #23
0
 public PlayerHub(IPlayerStore playerStore)
 {
     PlayerStore = playerStore;
 }
Пример #24
0
 protected abstract THandler CreateSutImpl(
     IPlayerStore playerStore,
     IRandom random,
     IOptions <TOptions> opts);
 public LineGameModeDecorator(ILogLineEventConverter component, IPlayerStore playerStore)
 {
     _component   = component;
     _playerStore = playerStore;
 }
Пример #26
0
 public PlayerValidator(
     IPlayerStore store
     )
 {
     _store = store;
 }
Пример #27
0
 private void Awake()
 {
     _playerStore = FindObjectOfType <PlayerStore>();
 }