{"id":4025,"date":"2025-06-15T08:36:53","date_gmt":"2025-06-15T13:36:53","guid":{"rendered":"https:\/\/madlysane.com\/?page_id=4025"},"modified":"2025-06-15T08:36:53","modified_gmt":"2025-06-15T13:36:53","slug":"sequence-shift","status":"publish","type":"page","link":"https:\/\/madlysane.com\/en\/sequence-shift\/","title":{"rendered":"Sequence Shift"},"content":{"rendered":"\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n  <meta charset=\"UTF-8\">\n  <title>Sequence Shift<\/title>\n  <style>\n    body {\n      font-family: Arial, sans-serif;\n      text-align: center;\n      background: #f0f0f0;\n      padding: 40px;\n    }\n    .game {\n      background: #fff;\n      padding: 30px;\n      border-radius: 10px;\n      box-shadow: 0 0 10px rgba(0,0,0,0.1);\n      display: inline-block;\n    }\n    .color-tile {\n      width: 100px;\n      height: 100px;\n      display: inline-block;\n      margin: 10px;\n      border-radius: 10px;\n      cursor: pointer;\n      transition: background-color 0.3s;\n    }\n    #message {\n      margin-top: 20px;\n      font-size: 20px;\n    }\n  <\/style>\n<\/head>\n<body>\n  <div class=\"game\">\n    <h2>Sequence Shift<\/h2>\n    <p>Watch the color tiles flash gray and back. Then repeat the sequence!<\/p>\n    <div id=\"tiles\"><\/div>\n    <div id=\"message\"><\/div>\n  <\/div>\n\n  <script>\n    const colors = [\"red\", \"blue\", \"green\", \"yellow\"];\n    const tilesDiv = document.getElementById(\"tiles\");\n    const message = document.getElementById(\"message\");\n\n    let sequence = [];\n    let userInput = [];\n    let round = 0;\n    let colorMap = {};\n\n    function createTiles() {\n      tilesDiv.innerHTML = \"\";\n      colors.forEach(color => {\n        const tile = document.createElement(\"div\");\n        tile.className = \"color-tile\";\n        tile.style.backgroundColor = color;\n        tile.dataset.color = color;\n        tile.onclick = () => handleInput(color);\n        tilesDiv.appendChild(tile);\n        colorMap[color] = tile;\n      });\n    }\n\n    function flashTile(color, delay) {\n      const tile = colorMap[color];\n      setTimeout(() => {\n        tile.style.backgroundColor = \"gray\";\n        setTimeout(() => {\n          tile.style.backgroundColor = color;\n        }, 400);\n      }, delay);\n    }\n\n    function playSequence() {\n      message.textContent = `Round ${round + 1}`;\n      userInput = [];\n      sequence.forEach((color, i) => {\n        flashTile(color, i * 800);\n      });\n    }\n\n    function handleInput(color) {\n      userInput.push(color);\n      const index = userInput.length - 1;\n      if (userInput[index] !== sequence[index]) {\n        message.textContent = \"\u274c Wrong! Starting over.\";\n        sequence = [];\n        round = 0;\n        setTimeout(startGame, 1500);\n        return;\n      }\n      if (userInput.length === sequence.length) {\n        round++;\n        mutateSequence();\n        setTimeout(playSequence, 1000);\n      }\n    }\n\n    function mutateSequence() {\n      if (sequence.length > 0) {\n        const indexToChange = Math.floor(Math.random() * sequence.length);\n        sequence[indexToChange] = colors[Math.floor(Math.random() * colors.length)];\n      }\n      sequence.push(colors[Math.floor(Math.random() * colors.length)]);\n    }\n\n    function startGame() {\n      sequence = [colors[Math.floor(Math.random() * colors.length)]];\n      playSequence();\n    }\n\n    createTiles();\n    startGame();\n  <\/script>\n<\/body>\n<\/html>\n\n","protected":false},"excerpt":{"rendered":"<p>Sequence Shift Sequence Shift Watch the color tiles flash gray and back. Then repeat the sequence!<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"footnotes":""},"class_list":["post-4025","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.5 (Yoast SEO v27.5) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Sequence Shift - MadlySane.com<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/madlysane.com\/en\/sequence-shift\/\" class=\"yoast-seo-meta-tag\" \/>\n<meta property=\"og:locale\" content=\"en_US\" class=\"yoast-seo-meta-tag\" \/>\n<meta property=\"og:type\" content=\"article\" class=\"yoast-seo-meta-tag\" \/>\n<meta property=\"og:title\" content=\"Sequence Shift\" class=\"yoast-seo-meta-tag\" \/>\n<meta property=\"og:description\" content=\"Sequence Shift Sequence Shift Watch the color tiles flash gray and back. Then repeat the sequence!\" class=\"yoast-seo-meta-tag\" \/>\n<meta property=\"og:url\" content=\"https:\/\/madlysane.com\/en\/sequence-shift\/\" class=\"yoast-seo-meta-tag\" \/>\n<meta property=\"og:site_name\" content=\"MadlySane.com\" class=\"yoast-seo-meta-tag\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" class=\"yoast-seo-meta-tag\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/madlysane.com\\\/sequence-shift\\\/\",\"url\":\"https:\\\/\\\/madlysane.com\\\/sequence-shift\\\/\",\"name\":\"Sequence Shift - MadlySane.com\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/madlysanecom-fc9fa3.ingress-alpha.ewp.live\\\/#website\"},\"datePublished\":\"2025-06-15T13:36:53+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/madlysane.com\\\/sequence-shift\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/madlysane.com\\\/sequence-shift\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/madlysane.com\\\/sequence-shift\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/madlysanecom-fc9fa3.ingress-alpha.ewp.live\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Sequence Shift\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/madlysanecom-fc9fa3.ingress-alpha.ewp.live\\\/#website\",\"url\":\"https:\\\/\\\/madlysanecom-fc9fa3.ingress-alpha.ewp.live\\\/\",\"name\":\"MadlySane.com\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/madlysanecom-fc9fa3.ingress-alpha.ewp.live\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/madlysanecom-fc9fa3.ingress-alpha.ewp.live\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/madlysanecom-fc9fa3.ingress-alpha.ewp.live\\\/#organization\",\"name\":\"MadlySane.com LLC\",\"url\":\"https:\\\/\\\/madlysanecom-fc9fa3.ingress-alpha.ewp.live\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/madlysanecom-fc9fa3.ingress-alpha.ewp.live\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/madlysane.com\\\/wp-content\\\/uploads\\\/2025\\\/05\\\/profile_logo_e0516ebb-57a8-447d-9489-b48962f2e18e-2-e1753881599226.jpg\",\"contentUrl\":\"https:\\\/\\\/madlysane.com\\\/wp-content\\\/uploads\\\/2025\\\/05\\\/profile_logo_e0516ebb-57a8-447d-9489-b48962f2e18e-2-e1753881599226.jpg\",\"width\":60,\"height\":60,\"caption\":\"MadlySane.com LLC\"},\"image\":{\"@id\":\"https:\\\/\\\/madlysanecom-fc9fa3.ingress-alpha.ewp.live\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/madlysane.com\\\/yoast\"]}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Sequence Shift - MadlySane.com","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:\/\/madlysane.com\/en\/sequence-shift\/","og_locale":"en_US","og_type":"article","og_title":"Sequence Shift","og_description":"Sequence Shift Sequence Shift Watch the color tiles flash gray and back. Then repeat the sequence!","og_url":"https:\/\/madlysane.com\/en\/sequence-shift\/","og_site_name":"MadlySane.com","twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/madlysane.com\/sequence-shift\/","url":"https:\/\/madlysane.com\/sequence-shift\/","name":"Sequence Shift - MadlySane.com","isPartOf":{"@id":"https:\/\/madlysanecom-fc9fa3.ingress-alpha.ewp.live\/#website"},"datePublished":"2025-06-15T13:36:53+00:00","breadcrumb":{"@id":"https:\/\/madlysane.com\/sequence-shift\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/madlysane.com\/sequence-shift\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/madlysane.com\/sequence-shift\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/madlysanecom-fc9fa3.ingress-alpha.ewp.live\/"},{"@type":"ListItem","position":2,"name":"Sequence Shift"}]},{"@type":"WebSite","@id":"https:\/\/madlysanecom-fc9fa3.ingress-alpha.ewp.live\/#website","url":"https:\/\/madlysanecom-fc9fa3.ingress-alpha.ewp.live\/","name":"MadlySane.com","description":"","publisher":{"@id":"https:\/\/madlysanecom-fc9fa3.ingress-alpha.ewp.live\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/madlysanecom-fc9fa3.ingress-alpha.ewp.live\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/madlysanecom-fc9fa3.ingress-alpha.ewp.live\/#organization","name":"MadlySane.com LLC","url":"https:\/\/madlysanecom-fc9fa3.ingress-alpha.ewp.live\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/madlysanecom-fc9fa3.ingress-alpha.ewp.live\/#\/schema\/logo\/image\/","url":"https:\/\/madlysane.com\/wp-content\/uploads\/2025\/05\/profile_logo_e0516ebb-57a8-447d-9489-b48962f2e18e-2-e1753881599226.jpg","contentUrl":"https:\/\/madlysane.com\/wp-content\/uploads\/2025\/05\/profile_logo_e0516ebb-57a8-447d-9489-b48962f2e18e-2-e1753881599226.jpg","width":60,"height":60,"caption":"MadlySane.com LLC"},"image":{"@id":"https:\/\/madlysanecom-fc9fa3.ingress-alpha.ewp.live\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/madlysane.com\/yoast"]}]}},"jetpack_sharing_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/madlysane.com\/en\/wp-json\/wp\/v2\/pages\/4025","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/madlysane.com\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/madlysane.com\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/madlysane.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/madlysane.com\/en\/wp-json\/wp\/v2\/comments?post=4025"}],"version-history":[{"count":5,"href":"https:\/\/madlysane.com\/en\/wp-json\/wp\/v2\/pages\/4025\/revisions"}],"predecessor-version":[{"id":4073,"href":"https:\/\/madlysane.com\/en\/wp-json\/wp\/v2\/pages\/4025\/revisions\/4073"}],"wp:attachment":[{"href":"https:\/\/madlysane.com\/en\/wp-json\/wp\/v2\/media?parent=4025"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}