Files
gsd-framework/index.html
T
tiennm99 ff3f3a7b9b Add game-state planning, NoMovesDetector & overlay
Update project planning and implement game-end components: tweak .gitignore entries, bump planning state progress, and add extensive Phase 04 artifacts (plans, summary, research, validation) plus Phase 05 initial plan. Deliverables include index.html overlay for game-over UI and modifications to src/game/Game.ts and src/models/Tile.ts to support win / no-moves detection and restart hooks; also add GameStateManager / NoMovesDetector integration notes and tests scaffolding in planning docs. Purpose: prepare and record implementation details for win/lose detection, game-over overlay, input blocking, reset/restart flow, and board-generation recovery.
2026-03-11 17:45:14 +07:00

109 lines
2.8 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Pikachu Match Game</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background-color: #1a1a2e;
}
#game {
border-radius: 8px;
}
#score-display {
position: absolute;
top: 20px;
right: 20px;
background-color: rgba(26, 26, 70, 0.9);
color: #eaeaea;
padding: 16px 24px;
border-radius: 8px;
font-size: 24px;
font-weight: bold;
z-index: 100;
}
#game-over-overlay {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.8);
justify-content: center;
align-items: center;
z-index: 1000;
}
#overlay-content {
background-color: rgba(26, 26, 70, 0.95);
padding: 40px;
border-radius: 12px;
text-align: center;
}
#game-over-message {
font-size: 48px;
color: #eaeaea;
margin-bottom: 24px;
}
#restart-button {
padding: 16px 32px;
font-size: 24px;
background-color: #e94560;
color: white;
border: none;
border-radius: 8px;
cursor: pointer;
transition: background-color 0.2s;
}
#restart-button:hover {
background-color: #d63850;
}
#shuffle-overlay {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
justify-content: center;
align-items: center;
z-index: 500;
}
#shuffle-message {
background-color: rgba(26, 26, 70, 0.95);
padding: 24px 48px;
border-radius: 12px;
font-size: 32px;
color: #eaeaea;
}
</style>
</head>
<body>
<canvas id="game"></canvas>
<div id="score-container">
<div id="score-display">Score: 0</div>
<div id="previous-score-display" style="display: none;">Previous: 0</div>
</div>
<div id="game-over-overlay">
<div id="overlay-content">
<h1 id="game-over-message"></h1>
<button id="restart-button">Play Again</button>
</div>
</div>
<div id="shuffle-overlay">
<div id="shuffle-message">Shuffling...</div>
</div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>