public UserBridge(GameCenter gc, SystemControl sys, LogControl log, ReplayManager replay) { var ses = new SessionIdHandler(); _gameService = new GameServiceHandler(gc, sys, log, replay, ses); _userService = new UserServiceHandler(gc, sys); }
public static void Main() { //init instances: LogControl logControl = new LogControl(); SystemControl sysControl = new SystemControl(logControl); ReplayManager replayManager = new ReplayManager(); SessionIdHandler sidHandler = new SessionIdHandler(); GameCenter gameCenter = new GameCenter(sysControl, logControl, replayManager, sidHandler); var commHandler = CommunicationHandler.GetInstance(); MessageEventHandler eventHandler = new MessageEventHandler(gameCenter, sysControl, logControl, replayManager, sidHandler); gameCenter.SetMessageHandler(eventHandler); var webEventHandler = new WebEventHandler(new ServerEventHandler(sidHandler, null, gameCenter, sysControl, logControl, replayManager, null)); WebCommHandler webCommHandler = new WebCommHandler(webEventHandler); Task commTask = Task.Factory.StartNew(commHandler.Start); Task webCommTask = Task.Factory.StartNew(webCommHandler.Start); Console.WriteLine("starting comm"); Task eventTask = Task.Factory.StartNew(eventHandler.HandleIncomingMsgs); commTask.Wait(); webCommTask.Wait(); }
public GameBridge(GameCenter gc, SystemControl sys, LogControl log, ReplayManager replay) { _gameCenter = gc; var ses = new SessionIdHandler(); _gameService = new GameServiceHandler(gc, sys, log, replay, ses); _userService = new UserServiceHandler(gc, sys); _logDbHandler = new LogsOnlyForTest(); }
public GameServiceHandler(GameCenter gc, SystemControl sys, LogControl log, ReplayManager replay, SessionIdHandler sidHandler) { _gameCenter = gc; _systemControl = sys; _logControl = log; _replayManager = replay; //new MessageEventHandler(gc, sys, log, replay, sidHandler); _proxyDb = new GameDataProxy(_gameCenter); }
public GameCenter(SystemControl sys, LogControl log, ReplayManager replay, SessionIdHandler sidH) { proxyDB = new GameDataProxy(this); replayManager = replay; replayManager.InitProxy(proxyDB); _systemControl = sys; logControl = log; // this.games = new List<IGame>(); sidHandler = sidH; }
private void Init() { logs = new LogControl(); sc = new SystemControl(logs); replays = new ReplayManager(); sender = new SessionIdHandler(); games = new GameCenter(sc, logs, replays, sender); userService = new UserServiceHandler(games, sc); }