{"id":2504,"date":"2025-01-10T18:39:00","date_gmt":"2025-01-11T02:39:00","guid":{"rendered":"https:\/\/j05.a18.mytemp.website\/home\/hernandezhealth\/?page_id=2504"},"modified":"2025-01-10T19:30:17","modified_gmt":"2025-01-11T03:30:17","slug":"sopa-de-letras","status":"publish","type":"page","link":"http:\/\/j05.a18.mytemp.website\/home\/hernandezhealth\/sopa-de-letras\/","title":{"rendered":"Sopa de Letras"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"2504\" class=\"elementor elementor-2504\">\n\t\t\t\t<div class=\"elementor-element elementor-element-2ba44b1 e-flex e-con-boxed e-con e-parent\" data-id=\"2ba44b1\" 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-2a68eb7 elementor-widget elementor-widget-html\" data-id=\"2a68eb7\" 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<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <title>Sopa de Letras para Adultos Mayores<\/title>\n    <style>\n        body {\n            font-family: 'Montserrat', sans-serif;\n            display: flex;\n            flex-direction: column;\n            align-items: center;\n            justify-content: center;\n            margin: 0;\n            padding: 0;\n            background-color: #f4f4f4;\n        }\n\n        h1 {\n            font-weight: bold;\n        }\n\n        .grid {\n            display: grid;\n            grid-template-columns: repeat(15, 2em);\n            grid-gap: 2px;\n            margin: 20px 0;\n        }\n\n        .cell {\n            width: 2em;\n            height: 2em;\n            text-align: center;\n            line-height: 2em;\n            background-color: #ffffff;\n            border: 1px solid #ddd;\n            font-weight: bold;\n            font-size: 18px;\n            color: indigo;\n            cursor: pointer;\n            user-select: none;\n        }\n\n        .cell.selected {\n            background-color: #ffcc00;\n            color: #000;\n        }\n\n        .cell.found {\n            background-color: #90ee90;\n            color: #000;\n        }\n\n        .words {\n            margin-top: 20px;\n        }\n\n        .words li {\n            font-size: 18px;\n            font-weight: bold;\n            list-style: none;\n            margin: 5px 0;\n        }\n\n        .words li.found {\n            text-decoration: line-through;\n            color: green;\n        }\n    <\/style>\n<\/head>\n<body>\n    <h1>Sopa de Letras para Ejercitar la Memoria<\/h1>\n    <div id=\"grid\" class=\"grid\"><\/div>\n    <ul id=\"words\" class=\"words\"><\/ul>\n\n    <script>\n        const gridSize = 15; \/\/ 15x15 grid\n        const words = [\n            \"PERRO\", \"GATO\", \"CABALLO\", \"LEON\", \"TIGRE\", \"ELEFANTE\", \"OSO\", \"SERPIENTE\",\n            \"CONEJO\", \"ARDILLA\", \"PANDA\", \"DELFIN\", \"BALLENA\", \"CANGURO\", \"AGUILA\", \"TIBURON\",\n            \"CISNE\", \"LOBO\", \"FOCA\", \"CERVATILLO\"\n        ];\n\n        const directions = [\n            { x: 1, y: 0 }, \/\/ Horizontal right\n            { x: -1, y: 0 }, \/\/ Horizontal left\n            { x: 0, y: 1 }, \/\/ Vertical down\n            { x: 0, y: -1 }, \/\/ Vertical up\n            { x: 1, y: 1 }, \/\/ Diagonal down-right\n            { x: -1, y: -1 }, \/\/ Diagonal up-left\n            { x: 1, y: -1 }, \/\/ Diagonal up-right\n            { x: -1, y: 1 } \/\/ Diagonal down-left\n        ];\n\n        const grid = document.getElementById('grid');\n        const wordList = document.getElementById('words');\n\n        const board = Array(gridSize).fill(null).map(() => Array(gridSize).fill(''));\n        const selectedCells = [];\n\n        \/\/ Place words on the board\n        function placeWords() {\n            words.forEach(word => {\n                let placed = false;\n\n                while (!placed) {\n                    const direction = directions[Math.floor(Math.random() * directions.length)];\n                    const startX = Math.floor(Math.random() * gridSize);\n                    const startY = Math.floor(Math.random() * gridSize);\n\n                    let x = startX;\n                    let y = startY;\n                    let fits = true;\n\n                    for (let i = 0; i < word.length; i++) {\n                        if (x < 0 || y < 0 || x >= gridSize || y >= gridSize || (board[y][x] && board[y][x] !== word[i])) {\n                            fits = false;\n                            break;\n                        }\n\n                        x += direction.x;\n                        y += direction.y;\n                    }\n\n                    if (fits) {\n                        x = startX;\n                        y = startY;\n\n                        for (let i = 0; i < word.length; i++) {\n                            board[y][x] = word[i];\n                            x += direction.x;\n                            y += direction.y;\n                        }\n\n                        placed = true;\n                    }\n                }\n            });\n        }\n\n        \/\/ Fill the board with random letters\n        function fillBoard() {\n            for (let y = 0; y < gridSize; y++) {\n                for (let x = 0; x < gridSize; x++) {\n                    if (!board[y][x]) {\n                        board[y][x] = String.fromCharCode(65 + Math.floor(Math.random() * 26));\n                    }\n                }\n            }\n        }\n\n        \/\/ Render the board and words\n        function renderBoard() {\n            grid.innerHTML = '';\n            wordList.innerHTML = '';\n\n            board.forEach((row, y) => {\n                row.forEach((letter, x) => {\n                    const cell = document.createElement('div');\n                    cell.className = 'cell';\n                    cell.textContent = letter;\n                    cell.dataset.x = x;\n                    cell.dataset.y = y;\n                    grid.appendChild(cell);\n                });\n            });\n\n            words.forEach(word => {\n                const li = document.createElement('li');\n                li.textContent = word;\n                li.dataset.word = word;\n                wordList.appendChild(li);\n            });\n        }\n\n        \/\/ Handle cell selection\n        function handleCellClick(e) {\n            const cell = e.target;\n\n            if (!cell.classList.contains('cell')) return;\n\n            const x = parseInt(cell.dataset.x);\n            const y = parseInt(cell.dataset.y);\n\n            if (cell.classList.contains('selected')) {\n                cell.classList.remove('selected');\n                selectedCells.pop();\n            } else {\n                cell.classList.add('selected');\n                selectedCells.push({ x, y });\n            }\n\n            checkWords();\n        }\n\n        \/\/ Check if a word is found\n        function checkWords() {\n            const selectedText = selectedCells.map(({ x, y }) => board[y][x]).join('');\n\n            words.forEach(word => {\n                if (selectedText === word) {\n                    document.querySelector(`li[data-word=\"${word}\"]`).classList.add('found');\n\n                    selectedCells.forEach(({ x, y }) => {\n                        const cell = document.querySelector(`.cell[data-x=\"${x}\"][data-y=\"${y}\"]`);\n                        cell.classList.remove('selected');\n                        cell.classList.add('found');\n                    });\n\n                    selectedCells.length = 0;\n                    checkGameCompletion();\n                }\n            });\n        }\n\n        \/\/ Check if all words are found\n        function checkGameCompletion() {\n            const allFound = Array.from(document.querySelectorAll('.words li')).every(li => li.classList.contains('found'));\n\n            if (allFound) {\n                alert('\u00a1Felicidades! Has encontrado todas las palabras.');\n            }\n        }\n\n        placeWords();\n        fillBoard();\n        renderBoard();\n\n        grid.addEventListener('click', handleCellClick);\n    <\/script>\n<\/body>\n<\/html>\n\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>Sopa de Letras para Adultos Mayores Sopa de Letras para Ejercitar la Memoria<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_uag_custom_page_level_css":"","site-sidebar-layout":"no-sidebar","site-content-layout":"page-builder","ast-site-content-layout":"full-width-container","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"disabled","ast-breadcrumbs-content":"","ast-featured-img":"disabled","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"class_list":["post-2504","page","type-page","status-publish","hentry"],"spectra_custom_meta":{"_customize_changeset_uuid":["7e275843-d2c9-4b78-9dbe-2a6af374f5ad"],"_edit_lock":["1754094322:1"],"_elementor_edit_mode":["builder"],"_elementor_template_type":["wp-page"],"_elementor_version":["3.26.4"],"_astra_content_layout_flag":["disabled"],"site-post-title":["disabled"],"ast-title-bar-display":["disabled"],"ast-featured-img":["disabled"],"site-content-layout":["page-builder"],"ast-site-content-layout":["full-width-container"],"site-sidebar-layout":["no-sidebar"],"_wp_page_template":["default"],"_elementor_data":["[{\"id\":\"2ba44b1\",\"elType\":\"container\",\"settings\":[],\"elements\":[{\"id\":\"2a68eb7\",\"elType\":\"widget\",\"settings\":{\"html\":\"<!DOCTYPE html>\\n<html lang=\\\"en\\\">\\n<head>\\n    <meta charset=\\\"UTF-8\\\">\\n    <meta name=\\\"viewport\\\" content=\\\"width=device-width, initial-scale=1.0\\\">\\n    <title>Sopa de Letras para Adultos Mayores<\\\/title>\\n    <style>\\n        body {\\n            font-family: 'Montserrat', sans-serif;\\n            display: flex;\\n            flex-direction: column;\\n            align-items: center;\\n            justify-content: center;\\n            margin: 0;\\n            padding: 0;\\n            background-color: #f4f4f4;\\n        }\\n\\n        h1 {\\n            font-weight: bold;\\n        }\\n\\n        .grid {\\n            display: grid;\\n            grid-template-columns: repeat(15, 2em);\\n            grid-gap: 2px;\\n            margin: 20px 0;\\n        }\\n\\n        .cell {\\n            width: 2em;\\n            height: 2em;\\n            text-align: center;\\n            line-height: 2em;\\n            background-color: #ffffff;\\n            border: 1px solid #ddd;\\n            font-weight: bold;\\n            font-size: 18px;\\n            color: indigo;\\n            cursor: pointer;\\n            user-select: none;\\n        }\\n\\n        .cell.selected {\\n            background-color: #ffcc00;\\n            color: #000;\\n        }\\n\\n        .cell.found {\\n            background-color: #90ee90;\\n            color: #000;\\n        }\\n\\n        .words {\\n            margin-top: 20px;\\n        }\\n\\n        .words li {\\n            font-size: 18px;\\n            font-weight: bold;\\n            list-style: none;\\n            margin: 5px 0;\\n        }\\n\\n        .words li.found {\\n            text-decoration: line-through;\\n            color: green;\\n        }\\n    <\\\/style>\\n<\\\/head>\\n<body>\\n    <h1>Sopa de Letras para Ejercitar la Memoria<\\\/h1>\\n    <div id=\\\"grid\\\" class=\\\"grid\\\"><\\\/div>\\n    <ul id=\\\"words\\\" class=\\\"words\\\"><\\\/ul>\\n\\n    <script>\\n        const gridSize = 15; \\\/\\\/ 15x15 grid\\n        const words = [\\n            \\\"PERRO\\\", \\\"GATO\\\", \\\"CABALLO\\\", \\\"LEON\\\", \\\"TIGRE\\\", \\\"ELEFANTE\\\", \\\"OSO\\\", \\\"SERPIENTE\\\",\\n            \\\"CONEJO\\\", \\\"ARDILLA\\\", \\\"PANDA\\\", \\\"DELFIN\\\", \\\"BALLENA\\\", \\\"CANGURO\\\", \\\"AGUILA\\\", \\\"TIBURON\\\",\\n            \\\"CISNE\\\", \\\"LOBO\\\", \\\"FOCA\\\", \\\"CERVATILLO\\\"\\n        ];\\n\\n        const directions = [\\n            { x: 1, y: 0 }, \\\/\\\/ Horizontal right\\n            { x: -1, y: 0 }, \\\/\\\/ Horizontal left\\n            { x: 0, y: 1 }, \\\/\\\/ Vertical down\\n            { x: 0, y: -1 }, \\\/\\\/ Vertical up\\n            { x: 1, y: 1 }, \\\/\\\/ Diagonal down-right\\n            { x: -1, y: -1 }, \\\/\\\/ Diagonal up-left\\n            { x: 1, y: -1 }, \\\/\\\/ Diagonal up-right\\n            { x: -1, y: 1 } \\\/\\\/ Diagonal down-left\\n        ];\\n\\n        const grid = document.getElementById('grid');\\n        const wordList = document.getElementById('words');\\n\\n        const board = Array(gridSize).fill(null).map(() => Array(gridSize).fill(''));\\n        const selectedCells = [];\\n\\n        \\\/\\\/ Place words on the board\\n        function placeWords() {\\n            words.forEach(word => {\\n                let placed = false;\\n\\n                while (!placed) {\\n                    const direction = directions[Math.floor(Math.random() * directions.length)];\\n                    const startX = Math.floor(Math.random() * gridSize);\\n                    const startY = Math.floor(Math.random() * gridSize);\\n\\n                    let x = startX;\\n                    let y = startY;\\n                    let fits = true;\\n\\n                    for (let i = 0; i < word.length; i++) {\\n                        if (x < 0 || y < 0 || x >= gridSize || y >= gridSize || (board[y][x] && board[y][x] !== word[i])) {\\n                            fits = false;\\n                            break;\\n                        }\\n\\n                        x += direction.x;\\n                        y += direction.y;\\n                    }\\n\\n                    if (fits) {\\n                        x = startX;\\n                        y = startY;\\n\\n                        for (let i = 0; i < word.length; i++) {\\n                            board[y][x] = word[i];\\n                            x += direction.x;\\n                            y += direction.y;\\n                        }\\n\\n                        placed = true;\\n                    }\\n                }\\n            });\\n        }\\n\\n        \\\/\\\/ Fill the board with random letters\\n        function fillBoard() {\\n            for (let y = 0; y < gridSize; y++) {\\n                for (let x = 0; x < gridSize; x++) {\\n                    if (!board[y][x]) {\\n                        board[y][x] = String.fromCharCode(65 + Math.floor(Math.random() * 26));\\n                    }\\n                }\\n            }\\n        }\\n\\n        \\\/\\\/ Render the board and words\\n        function renderBoard() {\\n            grid.innerHTML = '';\\n            wordList.innerHTML = '';\\n\\n            board.forEach((row, y) => {\\n                row.forEach((letter, x) => {\\n                    const cell = document.createElement('div');\\n                    cell.className = 'cell';\\n                    cell.textContent = letter;\\n                    cell.dataset.x = x;\\n                    cell.dataset.y = y;\\n                    grid.appendChild(cell);\\n                });\\n            });\\n\\n            words.forEach(word => {\\n                const li = document.createElement('li');\\n                li.textContent = word;\\n                li.dataset.word = word;\\n                wordList.appendChild(li);\\n            });\\n        }\\n\\n        \\\/\\\/ Handle cell selection\\n        function handleCellClick(e) {\\n            const cell = e.target;\\n\\n            if (!cell.classList.contains('cell')) return;\\n\\n            const x = parseInt(cell.dataset.x);\\n            const y = parseInt(cell.dataset.y);\\n\\n            if (cell.classList.contains('selected')) {\\n                cell.classList.remove('selected');\\n                selectedCells.pop();\\n            } else {\\n                cell.classList.add('selected');\\n                selectedCells.push({ x, y });\\n            }\\n\\n            checkWords();\\n        }\\n\\n        \\\/\\\/ Check if a word is found\\n        function checkWords() {\\n            const selectedText = selectedCells.map(({ x, y }) => board[y][x]).join('');\\n\\n            words.forEach(word => {\\n                if (selectedText === word) {\\n                    document.querySelector(`li[data-word=\\\"${word}\\\"]`).classList.add('found');\\n\\n                    selectedCells.forEach(({ x, y }) => {\\n                        const cell = document.querySelector(`.cell[data-x=\\\"${x}\\\"][data-y=\\\"${y}\\\"]`);\\n                        cell.classList.remove('selected');\\n                        cell.classList.add('found');\\n                    });\\n\\n                    selectedCells.length = 0;\\n                    checkGameCompletion();\\n                }\\n            });\\n        }\\n\\n        \\\/\\\/ Check if all words are found\\n        function checkGameCompletion() {\\n            const allFound = Array.from(document.querySelectorAll('.words li')).every(li => li.classList.contains('found'));\\n\\n            if (allFound) {\\n                alert('\\u00a1Felicidades! Has encontrado todas las palabras.');\\n            }\\n        }\\n\\n        placeWords();\\n        fillBoard();\\n        renderBoard();\\n\\n        grid.addEventListener('click', handleCellClick);\\n    <\\\/script>\\n<\\\/body>\\n<\\\/html>\\n\"},\"elements\":[],\"widgetType\":\"html\"}],\"isInner\":false}]"],"_elementor_controls_usage":["a:2:{s:4:\"html\";a:3:{s:5:\"count\";i:1;s:15:\"control_percent\";i:1;s:8:\"controls\";a:1:{s:7:\"content\";a:1:{s:13:\"section_title\";a:1:{s:4:\"html\";i:1;}}}}s:9:\"container\";a:3:{s:5:\"count\";i:1;s:15:\"control_percent\";i:0;s:8:\"controls\";a:0:{}}}"],"_uag_css_file_name":["uag-css-2504.css"],"_uag_page_assets":["a:9:{s:3:\"css\";s:260:\".uag-blocks-common-selector{z-index:var(--z-index-desktop) !important}@media(max-width: 976px){.uag-blocks-common-selector{z-index:var(--z-index-tablet) !important}}@media(max-width: 767px){.uag-blocks-common-selector{z-index:var(--z-index-mobile) !important}}\";s:2:\"js\";s:0:\"\";s:18:\"current_block_list\";a:8:{i:0;s:11:\"core\/search\";i:1;s:10:\"core\/group\";i:2;s:12:\"core\/heading\";i:3;s:17:\"core\/latest-posts\";i:4;s:20:\"core\/latest-comments\";i:5;s:13:\"core\/archives\";i:6;s:15:\"core\/categories\";i:7;s:14:\"core\/paragraph\";}s:8:\"uag_flag\";b:0;s:11:\"uag_version\";s:10:\"1778059143\";s:6:\"gfonts\";a:0:{}s:10:\"gfonts_url\";s:0:\"\";s:12:\"gfonts_files\";a:0:{}s:14:\"uag_faq_layout\";b:0;}"],"_elementor_css":["a:7:{s:4:\"time\";i:1778069185;s:5:\"fonts\";a:0:{}s:5:\"icons\";a:0:{}s:20:\"dynamic_elements_ids\";a:0:{}s:6:\"status\";s:6:\"inline\";i:0;s:0:\"\";s:3:\"css\";s:77:\".elementor-2504 .elementor-element.elementor-element-2ba44b1{--display:flex;}\";}"],"_elementor_page_assets":["a:1:{s:7:\"scripts\";a:1:{i:0;s:18:\"elementor-frontend\";}}"],"_elementor_element_cache":["{\"timeout\":1778130385,\"value\":{\"content\":\"<div class=\\\"elementor-element elementor-element-2ba44b1 e-flex e-con-boxed e-con e-parent\\\" data-id=\\\"2ba44b1\\\" 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-2a68eb7 elementor-widget elementor-widget-html\\\" data-id=\\\"2a68eb7\\\" 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<!DOCTYPE html>\\n<html lang=\\\"en\\\">\\n<head>\\n    <meta charset=\\\"UTF-8\\\">\\n    <meta name=\\\"viewport\\\" content=\\\"width=device-width, initial-scale=1.0\\\">\\n    <title>Sopa de Letras para Adultos Mayores<\\\/title>\\n    <style>\\n        body {\\n            font-family: 'Montserrat', sans-serif;\\n            display: flex;\\n            flex-direction: column;\\n            align-items: center;\\n            justify-content: center;\\n            margin: 0;\\n            padding: 0;\\n            background-color: #f4f4f4;\\n        }\\n\\n        h1 {\\n            font-weight: bold;\\n        }\\n\\n        .grid {\\n            display: grid;\\n            grid-template-columns: repeat(15, 2em);\\n            grid-gap: 2px;\\n            margin: 20px 0;\\n        }\\n\\n        .cell {\\n            width: 2em;\\n            height: 2em;\\n            text-align: center;\\n            line-height: 2em;\\n            background-color: #ffffff;\\n            border: 1px solid #ddd;\\n            font-weight: bold;\\n            font-size: 18px;\\n            color: indigo;\\n            cursor: pointer;\\n            user-select: none;\\n        }\\n\\n        .cell.selected {\\n            background-color: #ffcc00;\\n            color: #000;\\n        }\\n\\n        .cell.found {\\n            background-color: #90ee90;\\n            color: #000;\\n        }\\n\\n        .words {\\n            margin-top: 20px;\\n        }\\n\\n        .words li {\\n            font-size: 18px;\\n            font-weight: bold;\\n            list-style: none;\\n            margin: 5px 0;\\n        }\\n\\n        .words li.found {\\n            text-decoration: line-through;\\n            color: green;\\n        }\\n    <\\\/style>\\n<\\\/head>\\n<body>\\n    <h1>Sopa de Letras para Ejercitar la Memoria<\\\/h1>\\n    <div id=\\\"grid\\\" class=\\\"grid\\\"><\\\/div>\\n    <ul id=\\\"words\\\" class=\\\"words\\\"><\\\/ul>\\n\\n    <script>\\n        const gridSize = 15; \\\/\\\/ 15x15 grid\\n        const words = [\\n            \\\"PERRO\\\", \\\"GATO\\\", \\\"CABALLO\\\", \\\"LEON\\\", \\\"TIGRE\\\", \\\"ELEFANTE\\\", \\\"OSO\\\", \\\"SERPIENTE\\\",\\n            \\\"CONEJO\\\", \\\"ARDILLA\\\", \\\"PANDA\\\", \\\"DELFIN\\\", \\\"BALLENA\\\", \\\"CANGURO\\\", \\\"AGUILA\\\", \\\"TIBURON\\\",\\n            \\\"CISNE\\\", \\\"LOBO\\\", \\\"FOCA\\\", \\\"CERVATILLO\\\"\\n        ];\\n\\n        const directions = [\\n            { x: 1, y: 0 }, \\\/\\\/ Horizontal right\\n            { x: -1, y: 0 }, \\\/\\\/ Horizontal left\\n            { x: 0, y: 1 }, \\\/\\\/ Vertical down\\n            { x: 0, y: -1 }, \\\/\\\/ Vertical up\\n            { x: 1, y: 1 }, \\\/\\\/ Diagonal down-right\\n            { x: -1, y: -1 }, \\\/\\\/ Diagonal up-left\\n            { x: 1, y: -1 }, \\\/\\\/ Diagonal up-right\\n            { x: -1, y: 1 } \\\/\\\/ Diagonal down-left\\n        ];\\n\\n        const grid = document.getElementById('grid');\\n        const wordList = document.getElementById('words');\\n\\n        const board = Array(gridSize).fill(null).map(() => Array(gridSize).fill(''));\\n        const selectedCells = [];\\n\\n        \\\/\\\/ Place words on the board\\n        function placeWords() {\\n            words.forEach(word => {\\n                let placed = false;\\n\\n                while (!placed) {\\n                    const direction = directions[Math.floor(Math.random() * directions.length)];\\n                    const startX = Math.floor(Math.random() * gridSize);\\n                    const startY = Math.floor(Math.random() * gridSize);\\n\\n                    let x = startX;\\n                    let y = startY;\\n                    let fits = true;\\n\\n                    for (let i = 0; i < word.length; i++) {\\n                        if (x < 0 || y < 0 || x >= gridSize || y >= gridSize || (board[y][x] && board[y][x] !== word[i])) {\\n                            fits = false;\\n                            break;\\n                        }\\n\\n                        x += direction.x;\\n                        y += direction.y;\\n                    }\\n\\n                    if (fits) {\\n                        x = startX;\\n                        y = startY;\\n\\n                        for (let i = 0; i < word.length; i++) {\\n                            board[y][x] = word[i];\\n                            x += direction.x;\\n                            y += direction.y;\\n                        }\\n\\n                        placed = true;\\n                    }\\n                }\\n            });\\n        }\\n\\n        \\\/\\\/ Fill the board with random letters\\n        function fillBoard() {\\n            for (let y = 0; y < gridSize; y++) {\\n                for (let x = 0; x < gridSize; x++) {\\n                    if (!board[y][x]) {\\n                        board[y][x] = String.fromCharCode(65 + Math.floor(Math.random() * 26));\\n                    }\\n                }\\n            }\\n        }\\n\\n        \\\/\\\/ Render the board and words\\n        function renderBoard() {\\n            grid.innerHTML = '';\\n            wordList.innerHTML = '';\\n\\n            board.forEach((row, y) => {\\n                row.forEach((letter, x) => {\\n                    const cell = document.createElement('div');\\n                    cell.className = 'cell';\\n                    cell.textContent = letter;\\n                    cell.dataset.x = x;\\n                    cell.dataset.y = y;\\n                    grid.appendChild(cell);\\n                });\\n            });\\n\\n            words.forEach(word => {\\n                const li = document.createElement('li');\\n                li.textContent = word;\\n                li.dataset.word = word;\\n                wordList.appendChild(li);\\n            });\\n        }\\n\\n        \\\/\\\/ Handle cell selection\\n        function handleCellClick(e) {\\n            const cell = e.target;\\n\\n            if (!cell.classList.contains('cell')) return;\\n\\n            const x = parseInt(cell.dataset.x);\\n            const y = parseInt(cell.dataset.y);\\n\\n            if (cell.classList.contains('selected')) {\\n                cell.classList.remove('selected');\\n                selectedCells.pop();\\n            } else {\\n                cell.classList.add('selected');\\n                selectedCells.push({ x, y });\\n            }\\n\\n            checkWords();\\n        }\\n\\n        \\\/\\\/ Check if a word is found\\n        function checkWords() {\\n            const selectedText = selectedCells.map(({ x, y }) => board[y][x]).join('');\\n\\n            words.forEach(word => {\\n                if (selectedText === word) {\\n                    document.querySelector(`li[data-word=\\\"${word}\\\"]`).classList.add('found');\\n\\n                    selectedCells.forEach(({ x, y }) => {\\n                        const cell = document.querySelector(`.cell[data-x=\\\"${x}\\\"][data-y=\\\"${y}\\\"]`);\\n                        cell.classList.remove('selected');\\n                        cell.classList.add('found');\\n                    });\\n\\n                    selectedCells.length = 0;\\n                    checkGameCompletion();\\n                }\\n            });\\n        }\\n\\n        \\\/\\\/ Check if all words are found\\n        function checkGameCompletion() {\\n            const allFound = Array.from(document.querySelectorAll('.words li')).every(li => li.classList.contains('found'));\\n\\n            if (allFound) {\\n                alert('\\u00a1Felicidades! Has encontrado todas las palabras.');\\n            }\\n        }\\n\\n        placeWords();\\n        fillBoard();\\n        renderBoard();\\n\\n        grid.addEventListener('click', handleCellClick);\\n    <\\\/script>\\n<\\\/body>\\n<\\\/html>\\n\\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\",\"scripts\":[],\"styles\":[]}}"]},"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false},"uagb_author_info":{"display_name":"admin","author_link":"http:\/\/j05.a18.mytemp.website\/home\/hernandezhealth\/author\/admin\/"},"uagb_comment_info":0,"uagb_excerpt":"Sopa de Letras para Adultos Mayores Sopa de Letras para Ejercitar la Memoria","_links":{"self":[{"href":"http:\/\/j05.a18.mytemp.website\/home\/hernandezhealth\/wp-json\/wp\/v2\/pages\/2504","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/j05.a18.mytemp.website\/home\/hernandezhealth\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/j05.a18.mytemp.website\/home\/hernandezhealth\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/j05.a18.mytemp.website\/home\/hernandezhealth\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/j05.a18.mytemp.website\/home\/hernandezhealth\/wp-json\/wp\/v2\/comments?post=2504"}],"version-history":[{"count":5,"href":"http:\/\/j05.a18.mytemp.website\/home\/hernandezhealth\/wp-json\/wp\/v2\/pages\/2504\/revisions"}],"predecessor-version":[{"id":2539,"href":"http:\/\/j05.a18.mytemp.website\/home\/hernandezhealth\/wp-json\/wp\/v2\/pages\/2504\/revisions\/2539"}],"wp:attachment":[{"href":"http:\/\/j05.a18.mytemp.website\/home\/hernandezhealth\/wp-json\/wp\/v2\/media?parent=2504"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}