public IDResult joinGame (String gameName, String playerName) 
    {    
        try
        {
            if(gameName == null)
            {
                return new IDResult("illegal game name");
            }   
            if((!_gameManager.isGameExists()) || !(_gameManager.isGameSameName(gameName)))
            {
                return new IDResult("this game does not exist");
            }
            if(_gameManager.isGameActive())
            {
                return new IDResult("cannot join an active game");
            }
            if(_gameManager.getPlayerByName(playerName) != null || playerName == null || playerName.isEmpty())
            {
                return new IDResult("illegal player name");
            }
        
            int id = _gameManager.addPlayerToGame(playerName);
            if(_gameManager.isGameFull())
            {
                _gameManager.runGame();
            }
            return new IDResult(id);
        }
        catch(Exception e)
        {
            Logger.getLogger(MonopolyGame.class.getName()).log(Level.SEVERE, "error in join game", e);
            return new IDResult("unknown error");
        }
               
    }