private synchronized void leaveGame(ClientGameTread cgt) {
        if(gameStarted) {
            if(cgt.playerState.isActive()) {
                finishGame(cgt.ct.getNickname());
            }
        } else {
            for(PlayerState ps : players) {
                if(ps.getNickname().equals(cgt.ct.getNickname())) {
                    players.remove(ps);
                    if(players.size() == 0) {
                        controller.deleteLobby(this);
                    }
                    break;
                }
            }
        }
        cgt.ct.leaveGame();
    }