{"id":50401,"date":"2025-09-16T12:37:01","date_gmt":"2025-09-16T12:37:01","guid":{"rendered":"https:\/\/skdojo.com\/?p=50401"},"modified":"2025-09-16T12:42:45","modified_gmt":"2025-09-16T12:42:45","slug":"jeu-de-langle-dle","status":"publish","type":"post","link":"https:\/\/skdojo.com\/fr\/jeu-de-langle-dle\/","title":{"rendered":"D\u00e9fi Combien de Degr\u00e9s ? Devinez l'Angle"},"content":{"rendered":"\n<p class=\"translation-block\">\n    O <strong>Jogo do \u00c2ngulo<\/strong> \u00e9 uma atividade interativa e divertida onde voc\u00ea precisa adivinhar\n    o valor de um \u00e2ngulo representado graficamente. Ele \u00e9 ideal para estudantes, curiosos ou qualquer\n    pessoa que queira treinar sua percep\u00e7\u00e3o espacial de forma leve e desafiadora.\n  <\/p>\n\n\n\n<style>\n    \/* Escopo local ao componente *\/\n    #angle-game {\n      max-width: 1200px;\n      margin: 0 auto;             \/* centraliza no WP *\/\n      padding: 16px;\n      border: 1px solid #ddd;\n      border-radius: 12px;\n      text-align: center;         \/* centraliza textos internos *\/\n      box-shadow: 0 2px 8px rgba(0,0,0,.06);\n    }\n    #angle-game .row { margin: 10px 0; }\n    #angle-game canvas {\n      border: 1px solid #000;\n      margin: 12px auto;\n      display: block;             \/* garante centraliza\u00e7\u00e3o *\/\n      background: #fff;\n    }\n    #angle-game input[type=\"number\"],\n    #angle-game button {\n      padding: 8px 10px;\n      font-size: 16px;\n      box-sizing: border-box;\n      width: 100%;\n      margin: 10px;\n    }\n    #angle-game #mensagem { font-weight: bold; margin-top: 12px; min-height: 1.2em; }\n    #angle-game .sr-only {\n      position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;\n      overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;\n    }\n  <\/style>\n\n\n\n<div class=\"angle-game\" id=\"angle-game\"> \n <div id=\"i18n\" class=\"translation-block\" aria-hidden=\"true\" style=\"display:none\">\n    <span data-key=\"title\">Jogo do \u00c2ngulo \ud83c\udfaf<\/span>\n    <span data-key=\"labelPalpite\">Seu palpite (0\u00b0 a 360\u00b0):<\/span>\n    <span data-key=\"btnChutar\">Chutar<\/span>\n    <span data-key=\"btnReiniciar\">Reiniciar<\/span>\n    <span data-key=\"erroFaixa\">Digite um n\u00famero entre 0\u00b0 e 360\u00b0!<\/span>\n    <span data-key=\"msgMaior\">O \u00e2ngulo correto \u00e9 MAIOR que {guess}\u00b0. Tentativa {try}\/{max}<\/span>\n    <span data-key=\"msgMenor\">O \u00e2ngulo correto \u00e9 MENOR que {guess}\u00b0. Tentativa {try}\/{max}<\/span>\n    <span data-key=\"msgVenceu\">\ud83c\udf89 Parab\u00e9ns! Voc\u00ea acertou em {try} tentativa(s)! O \u00e2ngulo era {correct}\u00b0.<\/span>\n    <span data-key=\"msgPerdeu\">\ud83d\ude22 Fim de jogo! O \u00e2ngulo correto era {correct}\u00b0.<\/span>\n  <\/div>\n\n <h2 id=\"titulo\" class=\"row\">Jogo do \u00c2ngulo \ud83c\udfaf<\/h2>\n\n  <canvas id=\"anguloCanvas\" width=\"300\" height=\"300\" aria-label=\"Representa\u00e7\u00e3o do \u00e2ngulo\"><\/canvas>\n\n  <div class=\"row button\">\n    <label for=\"palpite\" id=\"label-palpite\">Seu palpite (0\u00b0 a 360\u00b0):<\/label><br>\n    <input type=\"number\" pattern=\"\\d*\" id=\"palpite\" min=\"0\" max=\"360\" inputmode=\"numeric\" oninput=\"this.value = this.value.replace(\/[^0-9]\/g, '');\" \/>\n    <button id=\"btn-chutar\">Chutar<\/button>\n    <button id=\"btn-reiniciar\" style=\"display:none\">Reiniciar<\/button>\n  <\/div>\n\n  <p id=\"mensagem\" aria-live=\"polite\"><\/p>\n<\/div>\n\n\n\n<script>\n    (function angleGame() {\n      \/\/ --- I18N: l\u00ea strings do HTML ---\n      const i18nEl = document.getElementById('i18n');\n      function getStr(key) {\n        const el = i18nEl && i18nEl.querySelector('[data-key=\"'+key+'\"]');\n        return el ? el.textContent.trim() : '';\n      }\n      function fmt(str, map) {\n        return str.replace(\/\\{(\\w+)\\}\/g, (_, k) => (map && (k in map)) ? map[k] : '{'+k+'}');\n      }\n\n      \/\/ --- Elementos ---\n      const container   = document.getElementById('angle-game');\n      const canvas      = document.getElementById('anguloCanvas');\n      const ctx         = canvas.getContext('2d');\n      const tituloEl    = document.getElementById('titulo');\n      const labelEl     = document.getElementById('label-palpite');\n      const inputEl     = document.getElementById('palpite');\n      const btnChutar   = document.getElementById('btn-chutar');\n      const btnReiniciar= document.getElementById('btn-reiniciar');\n      const msgEl       = document.getElementById('mensagem');\n\n      \/\/ --- Aplica textos traduz\u00edveis na UI est\u00e1tica ---\n      tituloEl.textContent  = getStr('title') || 'Jogo do \u00c2ngulo \ud83c\udfaf';\n      labelEl.textContent   = getStr('labelPalpite') || 'Seu palpite (0\u00b0 a 360\u00b0):';\n      btnChutar.textContent = getStr('btnChutar') || 'Chutar';\n      btnReiniciar.textContent = getStr('btnReiniciar') || 'Reiniciar';\n\n      \/\/ --- L\u00f3gica do jogo ---\n      const maxTentativas = 5;\n      let anguloCorreto = 0;\n      let tentativas = 0;\n      let terminado = false;\n\n      function novoJogo() {\n        terminado = false;\n        tentativas = 0;\n        anguloCorreto = Math.floor(Math.random() * 361); \/\/ 0..360\n        desenharAngulo(anguloCorreto);\n        msgEl.textContent = '';\n        inputEl.value = '';\n        inputEl.disabled = false;\n        btnChutar.disabled = false;\n        btnReiniciar.style.display = 'none';\n        inputEl.focus();\n      }\n\n      function desenharAngulo(angulo) {\n        ctx.clearRect(0, 0, canvas.width, canvas.height);\n        const cx = canvas.width \/ 2;\n        const cy = canvas.height \/ 2;\n        const r  = 110;\n\n        \/\/ C\u00edrculo de refer\u00eancia\n        ctx.beginPath();\n        ctx.arc(cx, cy, r, 0, 2 * Math.PI);\n        ctx.strokeStyle = '#000';\n        ctx.lineWidth = 1;\n        ctx.stroke();\n\n        \/\/ Linha 0\u00b0\n        ctx.beginPath();\n        ctx.moveTo(cx, cy);\n        ctx.lineTo(cx + r, cy);\n        ctx.strokeStyle = 'gray';\n        ctx.lineWidth = 1;\n        ctx.stroke();\n\n        \/\/ Linha \u00e2ngulo\n        const rad = (Math.PI \/ 180) * angulo;\n        ctx.beginPath();\n        ctx.moveTo(cx, cy);\n        ctx.lineTo(cx + r * Math.cos(rad), cy - r * Math.sin(rad));\n        ctx.strokeStyle = 'red';\n        ctx.lineWidth = 2;\n        ctx.stroke();\n      }\n\n      function fazerPalpite() {\n        if (terminado) return;\n        const val = Number(inputEl.value);\n        if (!Number.isFinite(val) || val < 0 || val > 360) {\n          msgEl.textContent = getStr('erroFaixa') || 'Digite um n\u00famero entre 0\u00b0 e 360\u00b0!';\n          return;\n        }\n\n        tentativas++;\n        if (val === anguloCorreto) {\n          msgEl.textContent = fmt(getStr('msgVenceu') || 'Parab\u00e9ns! Voc\u00ea acertou em {try} tentativa(s)! O \u00e2ngulo era {correct}\u00b0.', {\n            try: tentativas, correct: anguloCorreto\n          });\n          encerrar();\n        } else if (tentativas >= maxTentativas) {\n          msgEl.textContent = fmt(getStr('msgPerdeu') || 'Fim de jogo! O \u00e2ngulo correto era {correct}\u00b0.', {\n            correct: anguloCorreto\n          });\n          encerrar();\n        } else if (val < anguloCorreto) {\n          msgEl.textContent = fmt(getStr('msgMaior') || 'O \u00e2ngulo correto \u00e9 MAIOR que {guess}\u00b0. Tentativa {try}\/{max}', {\n            guess: val, try: tentativas, max: maxTentativas\n          });\n        } else {\n          msgEl.textContent = fmt(getStr('msgMenor') || 'O \u00e2ngulo correto \u00e9 MENOR que {guess}\u00b0. Tentativa {try}\/{max}', {\n            guess: val, try: tentativas, max: maxTentativas\n          });\n        }\n      }\n\n      function encerrar() {\n        terminado = true;\n        inputEl.disabled = true;\n        btnChutar.disabled = true;\n        btnReiniciar.style.display = 'inline-block';\n      }\n\n      \/\/ Eventos\n      btnChutar.addEventListener('click', fazerPalpite);\n      btnReiniciar.addEventListener('click', novoJogo);\n      inputEl.addEventListener('keydown', (e) => {\n        if (e.key === 'Enter') fazerPalpite();\n      });\n\n      \/\/ Inicializa\n      novoJogo();\n    })();\n  <\/script>\n\n\n\n<h2 class=\"wp-block-heading\">Como funciona o jogo?<\/h2>\n\n\n\n<ul class=\"wp-block-list translation-block\">\n<li>Um \u00e2ngulo entre <strong>0\u00b0 e 360\u00b0<\/strong> \u00e9 sorteado e exibido em um c\u00edrculo.<\/li>\n\n\n\n<li>Voc\u00ea deve digitar seu palpite no campo num\u00e9rico.<\/li>\n\n\n\n<li>O jogo informa se o valor correto \u00e9 <em>maior<\/em> ou <em>menor<\/em> que o seu chute.<\/li>\n\n\n\n<li>Voc\u00ea tem at\u00e9 <strong>5 tentativas<\/strong> para acertar o \u00e2ngulo sorteado.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Por que jogar?<\/h2>\n\n\n\n<p class=\"translation-block\">\n    Esse tipo de atividade ajuda a desenvolver habilidades como:\n  <\/p>\n\n\n\n<ul class=\"wp-block-list translation-block\">\n<li><strong>Percep\u00e7\u00e3o visual:<\/strong> melhora sua capacidade de identificar medidas de \u00e2ngulos.<\/li>\n\n\n\n<li><strong>Racioc\u00ednio l\u00f3gico:<\/strong> cada palpite elimina possibilidades e aproxima voc\u00ea da resposta correta.<\/li>\n\n\n\n<li><strong>Aprendizado divertido:<\/strong> uma forma pr\u00e1tica de revisar conceitos de geometria.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Dicas para acertar mais r\u00e1pido<\/h2>\n\n\n\n<ol class=\"wp-block-list translation-block\">\n<li>Observe a posi\u00e7\u00e3o da linha vermelha em rela\u00e7\u00e3o \u00e0 linha cinza (0\u00b0).<\/li>\n\n\n\n<li>Um \u00e2ngulo \u00e9 medido no sentido anti-hor\u00e1rio. <\/li>\n\n\n\n<li>Lembre-se que o c\u00edrculo completo tem 360\u00b0 \u2013 meia volta \u00e9 180\u00b0 e um quarto de volta \u00e9 90\u00b0.<\/li>\n\n\n\n<li>Use as tentativas para refinar seu palpite: comece com valores aproximados e ajuste.<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":50409,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-50401","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-games","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-25","no-featured-image-padding"],"_links":{"self":[{"href":"https:\/\/skdojo.com\/fr\/wp-json\/wp\/v2\/posts\/50401","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/skdojo.com\/fr\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/skdojo.com\/fr\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/skdojo.com\/fr\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/skdojo.com\/fr\/wp-json\/wp\/v2\/comments?post=50401"}],"version-history":[{"count":9,"href":"https:\/\/skdojo.com\/fr\/wp-json\/wp\/v2\/posts\/50401\/revisions"}],"predecessor-version":[{"id":50411,"href":"https:\/\/skdojo.com\/fr\/wp-json\/wp\/v2\/posts\/50401\/revisions\/50411"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/skdojo.com\/fr\/wp-json\/wp\/v2\/media\/50409"}],"wp:attachment":[{"href":"https:\/\/skdojo.com\/fr\/wp-json\/wp\/v2\/media?parent=50401"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/skdojo.com\/fr\/wp-json\/wp\/v2\/categories?post=50401"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/skdojo.com\/fr\/wp-json\/wp\/v2\/tags?post=50401"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}