Exemplo n.º 1
0
 public GameHub(GameLobbyService gameLobbyService, UserConnectionsService userConnectionsService, IHubContext <GameHub> gameHubContext, GameUserRepository gameUserRepository)
 {
     this.gameLobbyService       = gameLobbyService;
     this.userConnectionsService = userConnectionsService;
     this.gameHubContext         = gameHubContext;
     this.gameUserRepository     = gameUserRepository;
 }
        private int Act(int roundId, InMemoryDatabase db)
        {
            var repository = new GameUserRepository(db);
            var service    = new GameUserService(repository);

            var result = service.GetResultForUserInRound(roundId, 1);

            return(result);
        }
Exemplo n.º 3
0
 public NetworkManager(ITcpServer tcpServer, IHashRepository hashRepository, IHashLoader hashLoader,
                       [Named("GameUserRepository")] IUserRepository gameUserRepository,
                       [Named("PendingUserRepository")] IUserRepository pendingUserRepository)
 {
     Server             = (TcpServer)tcpServer;
     _hashRepository    = (HashRepository)hashRepository;
     _hashLoader        = (HashLoader)hashLoader;
     _userRepository    = (GameUserRepository)gameUserRepository;
     _pendingRepository = (PendingUserRepository)pendingUserRepository;
 }