{"id":2448,"date":"2024-10-11T12:17:20","date_gmt":"2024-10-11T10:17:20","guid":{"rendered":"https:\/\/fahrtauglich.ch\/?page_id=2448"},"modified":"2025-02-10T22:11:19","modified_gmt":"2025-02-10T21:11:19","slug":"dual-n-back-test","status":"publish","type":"page","link":"https:\/\/fahrtauglich.ch\/fr\/praxisportal\/dual-n-back-test\/","title":{"rendered":"Dual N-Back-Test"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"2448\" class=\"elementor elementor-2448\" data-elementor-post-type=\"page\">\n\t\t\t\t<div class=\"elementor-element elementor-element-8d4d7bf e-flex e-con-boxed e-con e-parent\" data-id=\"8d4d7bf\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-073745f elementor-widget elementor-widget-heading\" data-id=\"073745f\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h1 class=\"elementor-heading-title elementor-size-default\">Dual N-Back-Test<\/h1>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-8fe7f66 e-flex e-con-boxed e-con e-parent\" data-id=\"8fe7f66\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-dc3b99f elementor-widget elementor-widget-heading\" data-id=\"dc3b99f\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\"><br>Anleitung zum Test<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-837e227 elementor-arrows-position-outside elementor-pagination-position-outside elementor--h-position-center elementor--v-position-middle elementor-widget elementor-widget-slides\" data-id=\"837e227\" data-element_type=\"widget\" data-e-type=\"widget\" data-settings=\"{&quot;autoplay_speed&quot;:10000,&quot;navigation&quot;:&quot;both&quot;,&quot;autoplay&quot;:&quot;yes&quot;,&quot;pause_on_hover&quot;:&quot;yes&quot;,&quot;pause_on_interaction&quot;:&quot;yes&quot;,&quot;infinite&quot;:&quot;yes&quot;,&quot;transition&quot;:&quot;slide&quot;,&quot;transition_speed&quot;:500}\" data-widget_type=\"slides.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<div class=\"elementor-swiper\">\n\t\t\t\t\t<div class=\"elementor-slides-wrapper elementor-main-swiper swiper\" role=\"region\" aria-roledescription=\"carousel\" aria-label=\"Slider\" dir=\"ltr\" data-animation=\"fadeInUp\">\n\t\t\t\t<div class=\"swiper-wrapper elementor-slides\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"elementor-repeater-item-f79a63f swiper-slide\" role=\"group\" aria-roledescription=\"slide\"><div class=\"swiper-slide-bg\" role=\"img\" aria-label=\"Dual N-Back-Test-Erkla\u0308rung\"><\/div><div class=\"swiper-slide-inner\" ><div class=\"swiper-slide-contents\"><\/div><\/div><\/div><div class=\"elementor-repeater-item-f830e47 swiper-slide\" role=\"group\" aria-roledescription=\"slide\"><div class=\"swiper-slide-bg\" role=\"img\" aria-label=\"Dual N-Back-Test-Anleitung\"><\/div><div class=\"swiper-slide-inner\" ><div class=\"swiper-slide-contents\"><\/div><\/div><\/div><div class=\"elementor-repeater-item-06c7fbb swiper-slide\" role=\"group\" aria-roledescription=\"slide\"><div class=\"swiper-slide-bg\" role=\"img\" aria-label=\"Dual N-Back-Test_Schritt 3\"><\/div><div class=\"swiper-slide-inner\" ><div class=\"swiper-slide-contents\"><\/div><\/div><\/div><div class=\"elementor-repeater-item-608eb7b swiper-slide\" role=\"group\" aria-roledescription=\"slide\"><div class=\"swiper-slide-bg\" role=\"img\" aria-label=\"Dual N-Back-Test_Schritt 4\"><\/div><div class=\"swiper-slide-inner\" ><div class=\"swiper-slide-contents\"><\/div><\/div><\/div><div class=\"elementor-repeater-item-894b07d swiper-slide\" role=\"group\" aria-roledescription=\"slide\"><div class=\"swiper-slide-bg\" role=\"img\" aria-label=\"Dual N-Back-Test_Schritt 5\"><\/div><div class=\"swiper-slide-inner\" ><div class=\"swiper-slide-contents\"><\/div><\/div><\/div><div class=\"elementor-repeater-item-2a04758 swiper-slide\" role=\"group\" aria-roledescription=\"slide\"><div class=\"swiper-slide-bg\" role=\"img\" aria-label=\"Dual N-Back-Test_Schritt 6\"><\/div><div class=\"swiper-slide-inner\" ><div class=\"swiper-slide-contents\"><\/div><\/div><\/div><div class=\"elementor-repeater-item-73b919a swiper-slide\" role=\"group\" aria-roledescription=\"slide\"><div class=\"swiper-slide-bg\" role=\"img\" aria-label=\"Dual N-Back-Test-Anleitung-Erkla\u0308rung-Kopfho\u0308rer\"><\/div><div class=\"swiper-slide-inner\" ><div class=\"swiper-slide-contents\"><\/div><\/div><\/div>\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"elementor-swiper-button elementor-swiper-button-prev\" role=\"button\" tabindex=\"0\" aria-label=\"Vorheriger Slide\">\n\t\t\t\t\t\t\t<svg aria-hidden=\"true\" class=\"e-font-icon-svg e-eicon-chevron-left\" viewBox=\"0 0 1000 1000\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\"><path d=\"M646 125C629 125 613 133 604 142L308 442C296 454 292 471 292 487 292 504 296 521 308 533L604 854C617 867 629 875 646 875 663 875 679 871 692 858 704 846 713 829 713 812 713 796 708 779 692 767L438 487 692 225C700 217 708 204 708 187 708 171 704 154 692 142 675 129 663 125 646 125Z\"><\/path><\/svg>\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<div class=\"elementor-swiper-button elementor-swiper-button-next\" role=\"button\" tabindex=\"0\" aria-label=\"N\u00e4chster Slide\">\n\t\t\t\t\t\t\t<svg aria-hidden=\"true\" class=\"e-font-icon-svg e-eicon-chevron-right\" viewBox=\"0 0 1000 1000\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\"><path d=\"M696 533C708 521 713 504 713 487 713 471 708 454 696 446L400 146C388 133 375 125 354 125 338 125 325 129 313 142 300 154 292 171 292 187 292 204 296 221 308 233L563 492 304 771C292 783 288 800 288 817 288 833 296 850 308 863 321 871 338 875 354 875 371 875 388 867 400 854L696 533Z\"><\/path><\/svg>\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"swiper-pagination\"><\/div>\n\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-9458b50 elementor-widget elementor-widget-spacer\" data-id=\"9458b50\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"spacer.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-spacer\">\n\t\t\t<div class=\"elementor-spacer-inner\"><\/div>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-bfe5fde e-flex e-con-boxed e-con e-parent\" data-id=\"bfe5fde\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-d5869e8 elementor-widget elementor-widget-heading\" data-id=\"d5869e8\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Der Test: Dual N-Back<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-6ee8008 e-flex e-con-boxed e-con e-parent\" data-id=\"6ee8008\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-e0303d2 elementor-widget-mobile__width-inherit elementor-widget elementor-widget-spacer\" data-id=\"e0303d2\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"spacer.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-spacer\">\n\t\t\t<div class=\"elementor-spacer-inner\"><\/div>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-c21f1e3 elementor-widget elementor-widget-html\" data-id=\"c21f1e3\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<head>\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n\n    <style>\n        .n-back-app {\n            max-width: 500px;\n            margin: auto;\n            text-align: center;\n            font-family: Arial, sans-serif;\n            font-weight: bold;\n        }\n\n        .control-panel, .input-panel {\n            margin: 20px 0;\n        }\n\n        .level-selection, .step-selection {\n            margin: 10px 0;\n        }\n\n        .matrix {\n            display: grid;\n            grid-template-columns: repeat(3, 100px);\n            gap: 10px;\n            justify-content: center;\n        }\n\n        .cell {\n            width: 100px;\n            height: 100px;\n            background-color: #cfd8dc;\n            display: flex;\n            align-items: center;\n            justify-content: center;\n            cursor: pointer;\n            transition: background-color 0.3s ease;\n            border-radius: 10px; \/* Ecken leicht abrunden *\/\n        }\n\n        .cell.active {\n            background-color: #ffab40; \/* Orangefarbener Hintergrund w\u00e4hrend der Sequenz *\/\n        }\n\n        .cell.user-selected {\n            background-color: #4caf50; \/* Gr\u00fcn zur Hervorhebung der Benutzeraktion *\/\n        }\n\n        button {\n            padding: 20px 40px;\n            font-size: 18px;\n            cursor: pointer;\n            background-color: #FFBE00;\n            color: #000; \/* Schrift in den Button-Boxen schwarz *\/\n            border: none;\n            border-radius: 4px;\n            margin: 9px;\n            transition: background-color 0.3s ease;\n            font-weight: bold;\n        }\n\n        button:hover {\n            background-color: #e6a700; \/* Dunklere Farbe beim \u00dcberfahren mit der Maus *\/\n        }\n        \n        button:disabled {\n            background-color: #cfd8dc; \/* Grau bei deaktiviertem Zustand *\/\n            cursor: not-allowed;\n        }\n\n        .score, .step-count, #current-level {\n            font-weight: bold;\n            margin-top: 20px;\n        }\n\n        \/* Stil f\u00fcr das Dropdown-Men\u00fc *\/\n        select#n-level {\n            margin-top: 10px;\n            padding: 8px;\n            display: block;\n            margin-left: auto;\n            margin-right: auto;\n            width: 120px;\n            font-size: 16px;\n            border-radius: 4px;\n            border: 2px solid #FFBE00;\n            color: #333;\n            font-weight: bold;\n            background-color: #fff;\n            transition: border-color 0.3s ease;\n        }\n\n        select#n-level:hover, select#n-level:focus {\n            border-color: #e6a700; \/* Dunklere Farbe beim \u00dcberfahren mit der Maus *\/\n        }\n\n        \/* Stil f\u00fcr die Scrollbar *\/\n        input[type=\"range\"] {\n            -webkit-appearance: none;\n            width: 150px;\n            height: 8px;\n            border-radius: 10px;\n            background: #e0e0e0;\n            outline: none;\n            transition: background 0.3s ease;\n        }\n\n        input[type=\"range\"]::-webkit-slider-thumb {\n            -webkit-appearance: none;\n            appearance: none;\n            width: 20px;\n            height: 40px;\n            border-radius: 10px;\n            background: #FFBE00; \/* Farbe angepasst an Bild *\/\n            cursor: pointer;\n            box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);\n        }\n\n        input[type=\"range\"]::-moz-range-thumb {\n            width: 20px;\n            height: 40px;\n            border-radius: 10px;\n            background: #d2a679; \/* Farbe angepasst an Bild *\/\n            cursor: pointer;\n            box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);\n        }\n\n        \/* Mobile Optimierung *\/\n        @media (max-width: 768px) {\n            .n-back-app {\n                max-width: 100%;\n                padding: 10px;\n            }\n\n            .matrix {\n                grid-template-columns: repeat(3, 80px);\n                gap: 8px;\n            }\n\n            .cell {\n                width: 80px;\n                height: 80px;\n            }\n\n            button {\n                padding: 15px 30px;\n                font-size: 18px;\n            }\n\n            select#n-level {\n                width: 100px;\n                font-size: 14px;\n            }\n\n            input[type=\"range\"] {\n                width: 120px;\n            }\n        }\n    <\/style>\n\n<\/head>\n<body>\n<div class=\"n-back-app\">\n    <div class=\"control-panel\">\n\n        <div class=\"level-selection\">\n            <label for=\"n-level\">Stufe (N):<\/label>\n            <select id=\"n-level\" name=\"n-level\">\n                <option value=\"1\">N = 1<\/option>\n                <option value=\"2\">N = 2<\/option>\n                <option value=\"3\">N = 3<\/option>\n                <option value=\"4\">N = 4<\/option>\n                <option value=\"5\">N = 5<\/option>\n                <option value=\"6\">N = 6<\/option>\n                <option value=\"7\">N = 7<\/option>\n                <option value=\"8\">N = 8<\/option>\n                <option value=\"9\">N = 9<\/option>\n            <\/select>\n            <div id=\"current-level\">Aktuelle Stufe (N): 1<\/div>\n        <\/div>\n        <div class=\"step-selection\">\n            <label for=\"step-count\">Anzahl der Schritte:<\/label>\n            <input type=\"range\" id=\"step-count-input\"\n            name=\"step-count\" min=\"10\" max=\"40\" value=\"10\">\n            <span id=\"step-count-display\">10<\/span>\n        <\/div>\n        <button id=\"start-btn\">Start<\/button>\n        <button id=\"stop-btn\">Stop<\/button>\n    <\/div>\n\n    <div class=\"matrix\">\n        <div class=\"cell\" id=\"cell-0\"><\/div>\n        <div class=\"cell\" id=\"cell-1\"><\/div>\n        <div class=\"cell\" id=\"cell-2\"><\/div>\n        <div class=\"cell\" id=\"cell-3\"><\/div>\n        <div class=\"cell\" id=\"cell-4\"><\/div>\n        <div class=\"cell\" id=\"cell-5\"><\/div>\n        <div class=\"cell\" id=\"cell-6\"><\/div>\n        <div class=\"cell\" id=\"cell-7\"><\/div>\n        <div class=\"cell\" id=\"cell-8\"><\/div>\n    <\/div>\n\n    <div class=\"input-panel\">\n        <button id=\"position-btn\">Position<\/button>\n        <button id=\"sound-btn\">Sound<\/button>\n        <button id=\"both-btn\">Beides<\/button>\n    <\/div>\n    <div class=\"score\" id=\"score\">Richtige Antworten: 0<\/div>\n    <div class=\"step-count\" id=\"step-count\">Aktueller Schritt: 0 \/ 10<\/div>\n<\/div>\n\n<script>\n    jQuery(document).ready(function($) {\n        let sequence = [];\n        let userAnswers = [];\n        let currentStep = 0;\n        let interval;\n        let correctAnswers = 0;\n        let maxCorrectAnswers = 0;\n        let mistakesMade = false;\n        let isStopped = false;\n        let answerGiven = false;\n        let currentN = 1; \/\/ Startwert f\u00fcr N, kann von 1 bis 9 erh\u00f6ht werden\n        let totalSteps = 10; \/\/ Standardanzahl der Schritte\n\n        \/\/ Lade die Audio-Clips f\u00fcr die Stimuli vor\n        const audioStimuli = [\n            new Audio(\"https:\/\/fahrtauglich.ch\/wp-content\/uploads\/2024\/10\/H.wav\"),\n            new Audio(\"https:\/\/fahrtauglich.ch\/wp-content\/uploads\/2024\/10\/C.wav\"),\n            new Audio(\"https:\/\/fahrtauglich.ch\/wp-content\/uploads\/2024\/10\/Q.wav\"),\n            new Audio(\"https:\/\/fahrtauglich.ch\/wp-content\/uploads\/2024\/10\/P.wav\"),\n            new Audio(\"https:\/\/fahrtauglich.ch\/wp-content\/uploads\/2024\/10\/G.wav\"),\n            new Audio(\"https:\/\/fahrtauglich.ch\/wp-content\/uploads\/2024\/10\/K.wav\"),\n            new Audio(\"https:\/\/fahrtauglich.ch\/wp-content\/uploads\/2024\/10\/W.wav\"),\n            new Audio(\"https:\/\/fahrtauglich.ch\/wp-content\/uploads\/2024\/10\/T.wav\")\n        ];\n\n        let audioLoadPromises = audioStimuli.map(audio => {\n            return new Promise((resolve, reject) => {\n                audio.preload = \"auto\";\n                audio.addEventListener(\"canplaythrough\", resolve);\n                audio.addEventListener(\"error\", reject);\n            });\n        });\n        \n        \/\/ Warte, bis alle Audiodateien vollst\u00e4ndig geladen sind\n        Promise.all(audioLoadPromises).then(() => {\n            \/\/ Start-Button aktivieren, wenn alle Audios geladen sind\n            $(\"#start-btn\").prop(\"disabled\", false);\n        }).catch(error => {\n            console.error(\"Fehler beim Laden der Audiodateien:\", error);\n        });\n\n        \/\/ Buttons f\u00fcr die Benutzerantworten\n        $(\"#position-btn\").on(\"click\", function() {\n            if (!answerGiven) {\n                userAnswers.push(\"position\");\n                checkUserAnswer();\n                answerGiven = true;\n            }\n        });\n\n        $(\"#sound-btn\").on(\"click\", function() {\n            if (!answerGiven) {\n                userAnswers.push(\"sound\");\n                checkUserAnswer();\n                answerGiven = true;\n            }\n        });\n\n        $(\"#both-btn\").on(\"click\", function() {\n            if (!answerGiven) {\n                userAnswers.push(\"both\");\n                checkUserAnswer();\n                answerGiven = true;\n            }\n        });\n\n        $(\"#start-btn\").on(\"click\", function() {\n            \/\/ Stummer Durchlauf aller Audio-Clips, um Benutzergeste zu registrieren (wichtig f\u00fcr mobile Ger\u00e4te)\n            let mutedPromise = Promise.all(audioStimuli.map(audio => {\n                audio.muted = true; \/\/ Audios stumm schalten\n                return audio.play().then(() => {\n                    audio.pause();\n                    audio.currentTime = 0;\n                }).catch(error => {\n                    console.log(\"Audio konnte nicht vorgespielt werden (mobile Autoplay-Einschr\u00e4nkung):\", error);\n                });\n            }));\n        \n            mutedPromise.then(() => {\n                \/\/ Alert anzeigen nach stummem Testdurchlauf\n                alert('Starten Sie jetzt mit der \u00dcbung');\n                audioStimuli.forEach(audio => audio.muted = false); \/\/ Audios wieder laut schalten\n                startTest();\n            });\n        });\n\n\n\n        \/\/ Stop-Button, um den Test zu stoppen\n        $(\"#stop-btn\").on(\"click\", function() {\n            stopTest();\n        });\n\n        \/\/ Level (N) \u00e4ndern\n        $(\"#n-level\").on(\"change\", function() {\n            currentN = parseInt($(this).val());\n            $(\"#current-level\").text(\"Aktuelle Stufe (N): \" + currentN);\n        });\n\n        \/\/ Anzahl der Schritte \u00e4ndern\n        $(\"#step-count-input\").on(\"input\", function() {\n            totalSteps = parseInt($(this).val());\n            $(\"#step-count-display\").text(totalSteps);\n            $(\"#step-count\").text(\"Aktueller Schritt: 0 \/ \" + totalSteps);\n        });\n\n        \/\/ Funktion, um den Test zu starten\n        function startTest() {\n            if (isStopped) {\n                \/\/ Wenn der Test gestoppt wurde, alles zur\u00fccksetzen\n                resetTest();\n            }\n            currentStep = 0;\n            userAnswers = []; \/\/ Benutzerantworten zur\u00fccksetzen\n            correctAnswers = 0;\n            mistakesMade = false;\n            sequence = generateSequence(totalSteps); \/\/ Generiere eine Sequenz mit der gew\u00e4hlten Anzahl von Schritten\n            calculateMaxCorrectAnswers(); \/\/ Berechne maximale Anzahl der korrekten Antworten\n            updateScore();\n            playSequence();\n        }\n\n        \/\/ Funktion, um den Test zu stoppen\n        function stopTest() {\n            isStopped = true;\n            clearInterval(interval);\n            alert(\"Der Test wurde gestoppt.\");\n        }\n\n        \/\/ Funktion, um den Test zur\u00fcckzusetzen\n        function resetTest() {\n            currentStep = 0;\n            correctAnswers = 0;\n            mistakesMade = false;\n            updateScore();\n            $(\"#step-count\").text(\"Aktueller Schritt: 0 \/ \" + totalSteps);\n            isStopped = false;\n        }\n\n        \/\/ Generiere eine Sequenz von zuf\u00e4lligen Positionen und Soundinformationen\n        function generateSequence(length) {\n            let sequence = [];\n            let types = [\"position\", \"sound\", \"both\"];\n            let typeCounts = { \"position\": 0, \"sound\": 0, \"both\": 0 };\n\n            for (let i = 0; i < length; i++) {\n                let position = Math.floor(Math.random() * 9); \/\/ Zuf\u00e4llige Position (0 bis 8)\n                let soundIndex = Math.floor(Math.random() * audioStimuli.length); \/\/ Zuf\u00e4lliger Soundindex\n                let type;\n\n                \/\/ W\u00e4hle den Typ so, dass das Verh\u00e4ltnis ausgeglichen bleibt\n                if (typeCounts[\"position\"] <= typeCounts[\"sound\"] && typeCounts[\"position\"] <= typeCounts[\"both\"]) {\n                    type = \"position\";\n                } else if (typeCounts[\"sound\"] <= typeCounts[\"position\"] && typeCounts[\"sound\"] <= typeCounts[\"both\"]) {\n                    type = \"sound\";\n                } else {\n                    type = \"both\";\n                }\n\n                typeCounts[type]++;\n                sequence.push({ position: position, soundIndex: soundIndex, type: type });\n            }\n            return sequence;\n        }\n\n        \/\/ Spiele die Sequenz ab\n        function playSequence() {\n            interval = setInterval(() => {\n                if (currentStep >= sequence.length) {\n                    clearInterval(interval);\n                    if (correctAnswers === maxCorrectAnswers) {\n                        alert(\"Gratulation! Die erste Stufe hast du erreicht. Erh\u00f6he die Schwierigkeitsstufe indem du auf n=\" + (currentN + 1) + \" wechselst.\");\n                    } else {\n                        alert(\"Du hast mind. 1 Fehler gemacht. Versuche es nochmals, bis du alles richtig hast. Du schaffst das!\");\n                    }\n                    return;\n                }\n        \n                const { position, soundIndex } = sequence[currentStep];\n                highlightCellAndPlaySound(position, soundIndex); \/\/ Combined action for blinking and sound\n                answerGiven = false;\n        \n                \/\/ Update progress in the game\n                $(\"#step-count\").text(\"Aktueller Schritt: \" + (currentStep + 1) + \" \/ \" + sequence.length);\n                currentStep++;\n            }, 2500); \/\/ Extended interval to ensure sounds finish\n        }\n\n\n        function highlightCellAndPlaySound(index, soundIndex) {\n            $(\".cell\").removeClass(\"active\");\n            const cell = $(\"#cell-\" + index);\n        \n            \/\/ Highlight the cell\n            cell.addClass(\"active\");\n        \n            \/\/ Play the sound immediately when the cell blinks\n            setTimeout(() => {\n                playSound(soundIndex);\n            }, 50); \/\/ Small delay ensures smoother playback synchronization\n        \n            \/\/ Remove the highlight after 2 seconds\n            setTimeout(() => {\n                cell.removeClass(\"active\");\n            }, 1000);\n        }\n\n\n        function playSound(soundIndex) {\n            const audioClip = audioStimuli[soundIndex];\n            if (audioClip) {\n                try {\n                    \/\/ Stop and reset the sound if it's currently playing\n                    if (!audioClip.paused) {\n                        audioClip.pause();\n                        audioClip.currentTime = 0;\n                    }\n        \n                    \/\/ Play the sound\n                    audioClip.volume = 1.0; \/\/ Ensure full volume\n                    audioClip.play().catch((error) => {\n                        console.error(\"Error playing sound:\", error);\n                    });\n                } catch (error) {\n                    console.error(\"Unexpected error with audio playback:\", error);\n                }\n            }\n        }\n\n        \/\/ Funktion, um die Benutzerantworten zu \u00fcberpr\u00fcfen\n        function checkUserAnswer() {\n            \/\/ Vermeide \u00dcberpr\u00fcfung, wenn der aktuelle Durchgang noch nicht abgeschlossen ist\n            if (currentStep <= currentN) {\n                return;\n            }\n\n            let userAnswer = userAnswers[userAnswers.length - 1];\n            let visualMatch = (currentStep - currentN >= 0) && (sequence[currentStep - 1].position === sequence[currentStep - currentN - 1].position);\n            let audioMatch = (currentStep - currentN >= 0) && (sequence[currentStep - 1].soundIndex === sequence[currentStep - currentN - 1].soundIndex);\n\n            \/\/ \u00dcberpr\u00fcfe die Eingabe basierend auf den \u00dcbereinstimmungen\n            if ((userAnswer === \"position\" && visualMatch && !audioMatch) ||\n                (userAnswer === \"sound\" && audioMatch && !visualMatch) ||\n                (userAnswer === \"both\" && visualMatch && audioMatch)) {\n                correctAnswers++;\n                giveFeedback(\"correct\");\n            } else {\n                mistakesMade = true;\n                giveFeedback(\"incorrect\");\n            }\n\n            updateScore();\n        }\n\n        \/\/ Gebe Feedback abh\u00e4ngig von der Antwort\n        function giveFeedback(type) {\n            if (type === \"correct\") {\n                console.log(\"Korrekte Antwort\");\n            } else if (type === \"incorrect\") {\n                console.log(\"Falsche Antwort\");\n            }\n        }\n\n        \/\/ Berechne die maximale Anzahl der richtigen Antworten\n        function calculateMaxCorrectAnswers() {\n            maxCorrectAnswers = 0;\n            for (let i = currentN; i < sequence.length; i++) {\n                let visualMatch = sequence[i].position === sequence[i - currentN].position;\n                let audioMatch = sequence[i].soundIndex === sequence[i - currentN].soundIndex;\n\n                if (visualMatch || audioMatch) {\n                    maxCorrectAnswers++;\n                }\n            }\n        }\n\n        \/\/ Aktualisiere die Anzeige der richtigen Antworten\n        function updateScore() {\n            $(\"#score\").text(\"Richtige Antworten: \" + correctAnswers + \" \/ \" + maxCorrectAnswers);\n        }\n    });\n<\/script>\n<\/body>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-e111882 elementor-widget-mobile__width-inherit elementor-widget elementor-widget-spacer\" data-id=\"e111882\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"spacer.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-spacer\">\n\t\t\t<div class=\"elementor-spacer-inner\"><\/div>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Entdecken Sie den Dual N-Back-Test: Effektives Training f\u00fcr Arbeitsged\u00e4chtnis und kognitive Flexibilit\u00e4t.<\/p>","protected":false},"author":1,"featured_media":0,"parent":1467,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"content-type":"","iawp_total_views":4809,"footnotes":""},"class_list":["post-2448","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Dual N-Back-Test: Steigert nachweislich Ihre Intelligenz!<\/title>\n<meta name=\"description\" content=\"Entdecken Sie den Dual N-Back-Test: Effektives Training f\u00fcr Arbeitsged\u00e4chtnis und kognitive Flexibilit\u00e4t.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/fahrtauglich.ch\/fr\/praxisportal\/dual-n-back-test\/\" \/>\n<meta property=\"og:locale\" content=\"fr_FR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Dual N-Back-Test: Steigert nachweislich Ihre Intelligenz!\" \/>\n<meta property=\"og:description\" content=\"Entdecken Sie den Dual N-Back-Test: Effektives Training f\u00fcr Arbeitsged\u00e4chtnis und kognitive Flexibilit\u00e4t.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/fahrtauglich.ch\/fr\/praxisportal\/dual-n-back-test\/\" \/>\n<meta property=\"og:site_name\" content=\"Fahrtauglich\" \/>\n<meta property=\"article:modified_time\" content=\"2025-02-10T21:11:19+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Dur\u00e9e de lecture estim\u00e9e\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/fahrtauglich.ch\\\/praxisportal\\\/dual-n-back-test\\\/\",\"url\":\"https:\\\/\\\/fahrtauglich.ch\\\/praxisportal\\\/dual-n-back-test\\\/\",\"name\":\"Dual N-Back-Test: Steigert nachweislich Ihre Intelligenz!\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/fahrtauglich.ch\\\/#website\"},\"datePublished\":\"2024-10-11T10:17:20+00:00\",\"dateModified\":\"2025-02-10T21:11:19+00:00\",\"description\":\"Entdecken Sie den Dual N-Back-Test: Effektives Training f\u00fcr Arbeitsged\u00e4chtnis und kognitive Flexibilit\u00e4t.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/fahrtauglich.ch\\\/praxisportal\\\/dual-n-back-test\\\/#breadcrumb\"},\"inLanguage\":\"fr-FR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/fahrtauglich.ch\\\/praxisportal\\\/dual-n-back-test\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/fahrtauglich.ch\\\/praxisportal\\\/dual-n-back-test\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Startseite\",\"item\":\"https:\\\/\\\/fahrtauglich.ch\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Praxisportal\",\"item\":\"https:\\\/\\\/fahrtauglich.ch\\\/praxisportal\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Dual N-Back-Test\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/fahrtauglich.ch\\\/#website\",\"url\":\"https:\\\/\\\/fahrtauglich.ch\\\/\",\"name\":\"Fahrtauglich\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/fahrtauglich.ch\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/fahrtauglich.ch\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"fr-FR\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/fahrtauglich.ch\\\/#organization\",\"name\":\"Fahrtauglich\",\"url\":\"https:\\\/\\\/fahrtauglich.ch\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"fr-FR\",\"@id\":\"https:\\\/\\\/fahrtauglich.ch\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/fahrtauglich.ch\\\/wp-content\\\/uploads\\\/2024\\\/08\\\/cropped-Logo-2.jpg\",\"contentUrl\":\"https:\\\/\\\/fahrtauglich.ch\\\/wp-content\\\/uploads\\\/2024\\\/08\\\/cropped-Logo-2.jpg\",\"width\":307,\"height\":188,\"caption\":\"Fahrtauglich\"},\"image\":{\"@id\":\"https:\\\/\\\/fahrtauglich.ch\\\/#\\\/schema\\\/logo\\\/image\\\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Dual N-Back-Test: Steigert nachweislich Ihre Intelligenz!","description":"Entdecken Sie den Dual N-Back-Test: Effektives Training f\u00fcr Arbeitsged\u00e4chtnis und kognitive Flexibilit\u00e4t.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/fahrtauglich.ch\/fr\/praxisportal\/dual-n-back-test\/","og_locale":"fr_FR","og_type":"article","og_title":"Dual N-Back-Test: Steigert nachweislich Ihre Intelligenz!","og_description":"Entdecken Sie den Dual N-Back-Test: Effektives Training f\u00fcr Arbeitsged\u00e4chtnis und kognitive Flexibilit\u00e4t.","og_url":"https:\/\/fahrtauglich.ch\/fr\/praxisportal\/dual-n-back-test\/","og_site_name":"Fahrtauglich","article_modified_time":"2025-02-10T21:11:19+00:00","twitter_card":"summary_large_image","twitter_misc":{"Dur\u00e9e de lecture estim\u00e9e":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/fahrtauglich.ch\/praxisportal\/dual-n-back-test\/","url":"https:\/\/fahrtauglich.ch\/praxisportal\/dual-n-back-test\/","name":"Dual N-Back-Test: Steigert nachweislich Ihre Intelligenz!","isPartOf":{"@id":"https:\/\/fahrtauglich.ch\/#website"},"datePublished":"2024-10-11T10:17:20+00:00","dateModified":"2025-02-10T21:11:19+00:00","description":"Entdecken Sie den Dual N-Back-Test: Effektives Training f\u00fcr Arbeitsged\u00e4chtnis und kognitive Flexibilit\u00e4t.","breadcrumb":{"@id":"https:\/\/fahrtauglich.ch\/praxisportal\/dual-n-back-test\/#breadcrumb"},"inLanguage":"fr-FR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/fahrtauglich.ch\/praxisportal\/dual-n-back-test\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/fahrtauglich.ch\/praxisportal\/dual-n-back-test\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Startseite","item":"https:\/\/fahrtauglich.ch\/"},{"@type":"ListItem","position":2,"name":"Praxisportal","item":"https:\/\/fahrtauglich.ch\/praxisportal\/"},{"@type":"ListItem","position":3,"name":"Dual N-Back-Test"}]},{"@type":"WebSite","@id":"https:\/\/fahrtauglich.ch\/#website","url":"https:\/\/fahrtauglich.ch\/","name":"Fahrtauglich","description":"","publisher":{"@id":"https:\/\/fahrtauglich.ch\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/fahrtauglich.ch\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"fr-FR"},{"@type":"Organization","@id":"https:\/\/fahrtauglich.ch\/#organization","name":"Fahrtauglich","url":"https:\/\/fahrtauglich.ch\/","logo":{"@type":"ImageObject","inLanguage":"fr-FR","@id":"https:\/\/fahrtauglich.ch\/#\/schema\/logo\/image\/","url":"https:\/\/fahrtauglich.ch\/wp-content\/uploads\/2024\/08\/cropped-Logo-2.jpg","contentUrl":"https:\/\/fahrtauglich.ch\/wp-content\/uploads\/2024\/08\/cropped-Logo-2.jpg","width":307,"height":188,"caption":"Fahrtauglich"},"image":{"@id":"https:\/\/fahrtauglich.ch\/#\/schema\/logo\/image\/"}}]}},"jetpack_sharing_enabled":true,"rttpg_featured_image_url":null,"rttpg_author":{"display_name":"fahrtauglich.ch","author_link":"https:\/\/fahrtauglich.ch\/fr\/blog\/author\/mintcream-quetzal-259960-hostingersite-com\/"},"rttpg_comment":0,"rttpg_category":null,"rttpg_excerpt":"Entdecken Sie den Dual N-Back-Test: Effektives Training f\u00fcr Arbeitsged\u00e4chtnis und kognitive Flexibilit\u00e4t.","_links":{"self":[{"href":"https:\/\/fahrtauglich.ch\/fr\/wp-json\/wp\/v2\/pages\/2448","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fahrtauglich.ch\/fr\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/fahrtauglich.ch\/fr\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/fahrtauglich.ch\/fr\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fahrtauglich.ch\/fr\/wp-json\/wp\/v2\/comments?post=2448"}],"version-history":[{"count":830,"href":"https:\/\/fahrtauglich.ch\/fr\/wp-json\/wp\/v2\/pages\/2448\/revisions"}],"predecessor-version":[{"id":4587,"href":"https:\/\/fahrtauglich.ch\/fr\/wp-json\/wp\/v2\/pages\/2448\/revisions\/4587"}],"up":[{"embeddable":true,"href":"https:\/\/fahrtauglich.ch\/fr\/wp-json\/wp\/v2\/pages\/1467"}],"wp:attachment":[{"href":"https:\/\/fahrtauglich.ch\/fr\/wp-json\/wp\/v2\/media?parent=2448"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}