Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
c2c0b2a
refactor: refatoração do codigo
Oct 6, 2026
a9d5a47
feat(pause): adcionando o modal
Oct 6, 2026
fd6541f
feat: adiciona diferentes temas visuais ao jogo
Fidelixjv Oct 8, 2026
a1f7fea
feat:adicionando tela de game-over
IanKilwiny Oct 8, 2026
57b8a44
adequando o tamanho dos botoes
Fidelixjv Oct 8, 2026
25b6adb
refactor:adicionando score e rows no popup
IanKilwiny Oct 8, 2026
720eb3b
ajustando cores dos botões
Fidelixjv Oct 8, 2026
41eefb8
adição de peças mk1
Rianx1601 Oct 8, 2026
109265a
feat: adiciona botao de reiniciar
ryanccoelho Oct 8, 2026
dc72ff0
implementa reinicio da partidae estiliza;ao do botao
ryanccoelho Oct 13, 2026
fdedf21
Merge main into feature/temas
Fidelixjv Oct 13, 2026
05c2220
feat(pause): styles e codigo do modal
JohnOnias Oct 13, 2026
c6133eb
merge: feature/pause
JohnOnias Oct 13, 2026
93f5871
atualização das corres das peças que estava bagunçado
Rianx1601 Oct 13, 2026
e09103c
romoção de uma peça block 4x4
Rianx1601 Oct 13, 2026
af2d4fe
merge: integra feature/reiniciar na main
ryanccoelho Oct 13, 2026
64a0b4d
corrigindo bugs
ryanccoelho Oct 13, 2026
b850fda
Revert "merge: integra feature/reiniciar na main"
ryanccoelho Oct 13, 2026
a4f5d66
fix: cria reinicio independente da partida
ryanccoelho Oct 13, 2026
7705573
Reapply "merge: integra feature/reiniciar na main"
ryanccoelho Oct 13, 2026
32404e8
feat: add conquistas
alexandrekawan7 Oct 14, 2026
0187871
Merge pull request #1 from Fidelixjv/feature/conquistas
alexandrekawan7 Oct 14, 2026
e1e3e61
merge:adicionar botao reinicar
ryanccoelho Oct 14, 2026
8ee647c
Merge remote-tracking branch 'origin/feature/temas' into testes
Fidelixjv Oct 14, 2026
ba42d1b
feat: adiciona sistema de áudio
pedrothiagos Oct 15, 2026
e0c382e
feat: integra áudio ao jogo
pedrothiagos Oct 15, 2026
82af7a7
feat: melhorar os contadores e o menu lateral
Bruno-adryelyson Oct 15, 2026
771ad78
Merge pull request #2 from Fidelixjv/feature/contador-linhasEliminadas
Bruno-adryelyson Oct 15, 2026
e4d65f6
Merge pull request #3 from Fidelixjv/testes
Bruno-adryelyson Oct 15, 2026
6769806
Merge pull request #4 from Fidelixjv/feature/game_play
Rianx1601 Oct 15, 2026
7c15547
Merge pull request #5 from Fidelixjv/feature/audio-jogo-correta
Rianx1601 Oct 15, 2026
42c94f6
correção style
Oct 27, 2026
e6fed0b
Merge branch 'main' into feature/pause
Fidelixjv Oct 27, 2026
583f9d4
Merge pull request #6 from Fidelixjv/feature/pause
Fidelixjv Oct 27, 2026
3ae937c
feat: Novo Tema (magic)
RafaelSantosIF Oct 27, 2026
3cb57b0
commit
Fidelixjv Oct 27, 2026
ec450d3
Merge branch 'main' into feature/temas
Fidelixjv Oct 27, 2026
208457b
remoção de figura
Rianx1601 Oct 27, 2026
942038f
Merge pull request #7 from Fidelixjv/feature/temas
Fidelixjv Oct 27, 2026
df449a3
merge: atualiza feature reiniciar com main
ryanccoelho Oct 27, 2026
c34c671
Merge branch 'main' into New-Theme
Rianx1601 Oct 27, 2026
6acd2f0
feat: altera cor do botao iniciar partida para azul royal
Bruno-adryelyson Oct 27, 2026
a06964c
Merge pull request #10 from Fidelixjv/feature/melhora-cor-botao
Bruno-adryelyson Oct 27, 2026
f4da019
fix: styles, quebra de media querys
Oct 27, 2026
f94fc41
Merge branch 'main' into New-Theme
Rianx1601 Oct 27, 2026
18cd4e1
Merge pull request #11 from Fidelixjv/feature/reiniciar
Fidelixjv Oct 27, 2026
02e7b3c
Merge pull request #8 from Fidelixjv/New-Theme
RafaelSantosIF Oct 27, 2026
c7da0a7
Merge pull request #12 from Fidelixjv/blocs
Rianx1601 Oct 27, 2026
888f7a1
feat: conquista de linhas de 10 para 12
alexandrekawan7 Oct 27, 2026
faa79c8
att: Readme
RafaelSantosIF Oct 27, 2026
edd7833
Merge branch 'main' of https://github.com/Fidelixjv/github-games-gpsl
RafaelSantosIF Oct 27, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 23 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,27 @@
## Welcome to GitHub Games
# GitHub Games — Fork educacional

A project based learning activity for people who are getting started with Git and GitHub.
Este repositório é um fork com fins educacionais, desenvolvido na disciplina de **Gerenciamento de Projetos para Softwares Livres**.

You can play the game at: https://githubschool.github.io/github-games/
## Sobre o jogo

>> _*SUPPORTED BROWSERS*: Chrome, Firefox, Safari, Opera and IE9+_
O projeto é uma versão de Tetris para navegador, feita em JavaScript. O objetivo é encaixar as peças para completar linhas e marcar pontos. A partida também acompanha o número de linhas e o nível, e oferece prévia da próxima peça, temas visuais, efeitos sonoros, pausa, reinício e conquistas.

This fun open source game was cloned from: https://github.com/jakesgordon/javascript-tetris
Para jogar, abra `index.html` em um navegador moderno.

## Contribuidores

- [Fidelixjv](https://github.com/Fidelixjv)
- [ryanccoelho](https://github.com/ryanccoelho)
- [Rianx1601](https://github.com/Rianx1601)
- [Bruno-adryelyson](https://github.com/Bruno-adryelyson)
- [IanKilwiny](https://github.com/IanKilwiny)
- [JohnOnias](https://github.com/JohnOnias)
- [pedrothiagos](https://github.com/pedrothiagos)
- [RafaelSantosIF](https://github.com/RafaelSantosIF)
- [alexandrekawan7](https://github.com/alexandrekawan7)

## Créditos

O jogo tem como base o projeto [GitHub Games](https://github.com/githubtraining/github-games), que por sua vez credita o [JavaScript Tetris de Jake Gordon](https://github.com/jakesgordon/javascript-tetris).

Este software é distribuído sob a licença MIT. Consulte [LICENSE](C:/Users/wwwra/Documents/github-games-gpsl/LICENSE).
Binary file added assets/pause.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
118 changes: 118 additions & 0 deletions audio.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@


(function () {
let audioContext = null;
let muted = false;
let musicTimer = null;
let noteIndex = 0;

const melody = [
261.63, 329.63, 392.00, 329.63,
293.66, 349.23, 440.00, 349.23,
261.63, 329.63, 392.00, 523.25,
440.00, 392.00, 329.63, 293.66
];

function init() {
const AudioContextClass =
window.AudioContext || window.webkitAudioContext;

if (!audioContext && AudioContextClass) {
audioContext = new AudioContextClass();
}

if (audioContext && audioContext.state === "suspended") {
audioContext.resume();
}
}

function tone(frequency, duration, volume, type) {
if (muted || !audioContext) return;

const oscillator = audioContext.createOscillator();
const gain = audioContext.createGain();
const now = audioContext.currentTime;

oscillator.type = type || "square";
oscillator.frequency.setValueAtTime(frequency, now);

gain.gain.setValueAtTime(volume, now);
gain.gain.exponentialRampToValueAtTime(
0.001, now + duration
);

oscillator.connect(gain);
gain.connect(audioContext.destination);

oscillator.start(now);
oscillator.stop(now + duration);
}

function startMusic() {
init();

if (!audioContext || musicTimer) return;

musicTimer = setInterval(function () {
if (!muted) {
tone(melody[noteIndex], 0.18, 0.025, "triangle");
noteIndex = (noteIndex + 1) % melody.length;
}
}, 220);
}

function stopMusic() {
clearInterval(musicTimer);
musicTimer = null;
}

function move() {
init();
tone(440, 0.045, 0.04);
}

function rotate() {
init();
tone(660, 0.065, 0.04);
}

function lock() {
init();
tone(180, 0.10, 0.05);
}

function toggleMute() {
muted = !muted;

const button = document.getElementById("muteButton");

if (button) {
button.textContent = muted
? "🔇 Som desligado"
: "🔊 Som ligado";

button.setAttribute("aria-pressed", String(muted));
}

if (!muted) init();
}

function isMuted() {
return muted;
}

document.getElementById("muteButton")
?.addEventListener("click", function () {
init();
toggleMute();
});

window.TetrisAudio = {
startMusic,
stopMusic,
move,
rotate,
lock,
isMuted
};
})();
Loading