Beispiel #1
0
 public ControllerGrain(
     ILogger <ControllerGrain> logger,
     IMapService mapService,
     IHitStrategy hitStrategy,
     IOptions <GameOptions> gameOptions,
     IOptions <SyncOptions> syncOptions)
 {
     Logger          = logger;
     GameOptions     = gameOptions;
     SyncOptions     = syncOptions;
     _mapService     = mapService;
     _hitStrategy    = hitStrategy;
     UpdatePeriod    = TimeSpan.FromMilliseconds(syncOptions.Value.UpdatePeriod);
     _lastUpdateTime = DateTime.Now - UpdatePeriod - UpdatePeriod;
 }
Beispiel #2
0
 public Dealer(RulesFactory rulesFactory)
 {
     newGameRule = rulesFactory.GetNewGameRule();
     hitRule     = rulesFactory.GetHitRule();
     winRule     = rulesFactory.GetWinRule();
 }