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; }
public Dealer(RulesFactory rulesFactory) { newGameRule = rulesFactory.GetNewGameRule(); hitRule = rulesFactory.GetHitRule(); winRule = rulesFactory.GetWinRule(); }