/// <summary>
        /// Proxy function that creates the game object server side.
        /// </summary>
        /// <param name="gameId"></param>
        /// <returns>Return the games password to display to the viewers.</returns>
        public async Task <string> InitGame(string gameId)
        {
            ServerGameSession game = MvcApplication.Manager.FindSession(gameId);

            if (game != null)
            {
                if (string.IsNullOrEmpty(game.GameConnectionId) && !game.GameStarted)
                {
                    game.GameConnectionId = Context.ConnectionId;
                    await Clients.Caller.setGameMode("AWAITING_PLAYERS");

                    if (game.game.Players.Count == 0)
                    {
                        game.game.CreateNewPlayerObjects();
                    }
                    else
                    {
                        if (game.game.HasConnectedPlayers())
                        {
                            await Clients.Caller.setGameMode("AWAITING_PLAYERS_REFRESHED");

                            await game.UpdateHost();
                        }
                    }
                }
                else if (string.IsNullOrEmpty(game.GameConnectionId) && game.GameStarted)
                {
                    game.GameConnectionId = Context.ConnectionId;
                    await Clients.Caller.setGameMode("RESUMING_GAME");

                    await game.UpdateHost();

                    PlayerObject pObject = game.game.Players.FirstOrDefault(n => n.id == game.game.CurrentPlayer);
                    await game.UpdateCurrentPlayingName(pObject);

                    await Clients.Caller.displayMessage($"Game is resuming");
                }
                else
                {
                    Clients.Caller.endSession("game is already being hosted somewhere else.");
                    return(null);
                }

                return(game.GamePassword);
            }
            else
            {
                Clients.Caller.endSession("unkown game id was passed to the server.");
            }
            return(null);
        }
        /// <summary>
        /// Proxy function that reports uno to the Game host
        /// </summary>
        /// <returns></returns>
        public async Task ReportUno()
        {
            ServerGameSession game = MvcApplication.Manager.FindSessionByClientConnectionId(Context.ConnectionId);

            if (game != null)
            {
                PlayerObject player = game.game.Players.FirstOrDefault(n => n.connid == Context.ConnectionId);
                player.reportedUno = true;
                await game.UpdateHost();
            }
        }