Este projeto é uma implementação do jogo Genius (Simon Says) usando apenas HTML, CSS e JavaScript. A interface é montada dinamicamente em tempo de execução pela função colocarLayoutStatico() (em assets/js/handlers.js). O jogo sorteia uma sequência de cores, exibe cada passo com animações, e aguarda o jogador repetir a sequência na mesma ordem. Se errar, mostra a pontuação alcançada, a maior pontuação da sessão e oferece o botão de reinício.
- Layout dinâmico com quatro botões coloridos: verde, amarelo, vermelho e azul.
- Animações visuais via
@keyframespara destacar o botão ativo. - Painel central com mensagens orientando cada etapa do jogo.
- Progressão de nível: a sequência cresce a cada acerto.
- Exibição de pontuação atual e maior pontuação da sessão.
- Botão "RECOMEÇAR" após erro para iniciar uma nova partida.
- Método mais simples: abra o arquivo
index.htmldiretamente em um navegador moderno (Chrome, Firefox, Edge, etc.). - Opcional (servidor estático):
- Python 3:
python3 -m http.server 8000e acessehttp://localhost:8000/. - Node (http-server):
npx http-server .e acesse o endereço exibido no terminal.
- Python 3:
Ao carregar a página, assets/js/index.js invoca comecar(), que inicializa o fluxo de mensagens e exibição da primeira sequência.
- Observe a sequência de cores que pisca na tela.
- Clique nos botões coloridos seguindo a mesma ordem apresentada.
- A cada rodada correta, uma nova cor é adicionada à sequência.
- Se errar, o jogo mostra sua pontuação na rodada, a maior pontuação registrada e exibe o botão "RECOMEÇAR".
jogoGenius/
├── index.html
├── assets/
│ ├── css/
│ │ ├── normalize.css
│ │ └── style.css
│ ├── img/
│ │ ├── genius-game-gif.gif
│ │ └── genius_game.jpg
│ └── js/
│ ├── handlers.js
│ └── index.js
index.html: documento base que carrega os estilos e scripts.assets/js/handlers.js: monta o layout, controla a lógica do jogo e as interações (funções comosortear,mostrarSequencia,verificar,vezDoJogador,retirarClick,comecar).assets/js/index.js: chamacomecar()ao carregar a página.assets/css/style.css: estilos, posicionamento e@keyframesdas cores.assets/css/normalize.css: normalização de estilos entre navegadores.assets/img/: imagens auxiliares (opcionais para documentação).
- Cores: edite o array
coresemassets/js/handlers.jspara alterar ou reordenar as cores. - Tempo e animações: ajuste os
setTimeoutemhandlers.jse asanimation-duration/@keyframesemstyle.csspara mudar a velocidade e o efeito visual. - Textos: as mensagens (por exemplo, "Seja Bem-vindo!", "Prepare-se e boa sorte!!") estão em
handlers.jse podem ser traduzidas ou alteradas conforme necessário.
- HTML5, CSS3 (inclui Normalize.css e Google Fonts), JavaScript puro (sem dependências externas).
Nenhuma licença foi definida no repositório. Adicione uma licença (por exemplo, MIT) conforme sua necessidade.
This project is a classic Genius (Simon Says) game implemented with plain HTML, CSS, and JavaScript. The UI is dynamically assembled at runtime by the colocarLayoutStatico() function (in assets/js/handlers.js). The game draws a color sequence, plays it with animations, and waits for the player to repeat it in the same order. On a mistake, it shows the round score, the session’s highest score, and provides a restart button.
- Dynamic layout with four colored pads: green, yellow, red, and blue.
- Visual highlights via
@keyframesanimations for the active pad. - Central panel messages guiding each stage of the game.
- Level progression: the sequence grows after each successful round.
- Displays current score and session high score.
- "RECOMEÇAR" (Restart) button after an error to start a new game.
- Easiest way: open
index.htmldirectly in a modern web browser (Chrome, Firefox, Edge, etc.). - Optional (static server):
- Python 3:
python3 -m http.server 8000then visithttp://localhost:8000/. - Node (http-server):
npx http-server .then visit the URL printed in the terminal.
- Python 3:
On page load, assets/js/index.js invokes comecar(), which initializes the message flow and shows the first sequence.
- Watch the color sequence as it flashes.
- Click the colored pads following the exact order.
- After each correct round, a new color is appended to the sequence.
- If you make a mistake, the game shows your round score, the highest score, and displays the "RECOMEÇAR" (Restart) button.
jogoGenius/
├── index.html
├── assets/
│ ├── css/
│ │ ├── normalize.css
│ │ └── style.css
│ ├── img/
│ │ ├── genius-game-gif.gif
│ │ └── genius_game.jpg
│ └── js/
│ ├── handlers.js
│ └── index.js
index.html: base document that loads styles and scripts.assets/js/handlers.js: builds the UI, controls the game logic and interactions (functions likesortear,mostrarSequencia,verificar,vezDoJogador,retirarClick,comecar).assets/js/index.js: callscomecar()on page load.assets/css/style.css: styling, layout, and color@keyframes.assets/css/normalize.css: browser style normalization.assets/img/: auxiliary images (optional for documentation).
- Colors: edit the
coresarray inassets/js/handlers.jsto change or reorder the pads. - Timing and animations: adjust
setTimeoutinhandlers.jsandanimation-duration/@keyframesinstyle.cssto change speed and visual effect. - Texts: the messages (e.g., "Seja Bem-vindo!", "Prepare-se e boa sorte!!") live in
handlers.jsand can be translated or customized as needed.
- HTML5, CSS3 (includes Normalize.css and Google Fonts), plain JavaScript (no external dependencies).
No license is defined in the repository. Add one (e.g., MIT) as needed.