public MtcgServer(IDatabase database, IBattleHandler battleHandler) { _sessions = new ConcurrentDictionary <Session, Guid>(); _invokeBattleLimiter = new SemaphoreSlim(2, 2); _invokeBattleExclusive = new SemaphoreSlim(1, 1); _invokeBattleHang = new SemaphoreSlim(0, 1); _db = database; _btl = battleHandler; _store = new CardStore(database); _packages = new PackageStore(database); _scoreboards = new Dictionary <string, IScoreboard>(StringComparer.OrdinalIgnoreCase); }
public MtcgWebServer(IWebServer webServer, IDatabase database, IBattleHandler battleHandler) { _web = webServer; _server = new MtcgServer.MtcgServer(database, battleHandler); }
public void Setup() { _handler = new CardImplHandler(new NullDb()); }