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); }
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; }