private synchronized void finishGame(String nickname) {
        pauseFlag = true;
        for(PlayerState ps : players) {
            if(ps.getNickname().equals(nickname)) {
                ps.setActive(false);
                if(!hasActivePlayer()) {
                    stopGame();
                } else {
                    if(players.indexOf(ps) == currectPlayer) {
                        setNextPlayer();
                    }
                }
                break;
            }
        }
        pauseFlag = false;
    }