بازی غول ریاضی
by PixelPanda9590 lines3.2 KB
<!DOCTYPE html>
<html lang="fa" dir="rtl">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>بازی غول ریاضی</title>
<style>
:root {
--primary: #6a1b9a;
--accent: #ff9800;
--success: #4caf50;
--error: #f44336;
--bg: #f3e5f5;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; font-family: Tahoma, sans-serif; }
body {
background-color: var(--bg); margin: 0; padding: 10px;
display: flex; flex-direction: column; align-items: center; min-height: 100vh;
}
.game-container {
width: 100%; max-width: 400px; background: white;
border-radius: 20px; padding: 20px;
box-shadow: 0 8px 20px rgba(0,0,0,0.1);
text-align: center; margin-top: 10px;
}
.header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.score-box { font-size: 1.2rem; font-weight: bold; color: var(--primary); }
.question-card {
background: #fff3e0; border: 3px dashed var(--accent);
border-radius: 15px; padding: 20px; margin-bottom: 20px;
}
#question { font-size: 1.8rem; font-weight: bold; color: #333; direction: ltr; }
.options-grid {
display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.opt-btn {
padding: 15px; font-size: 1.2rem; font-weight: bold;
border: 2px solid #e0e0e0; border-radius: 12px;
background: white; color: var(--primary);
cursor: pointer; transition: all 0.2s;
}
.opt-btn:active { transform: scale(0.95); background: #f0f0f0; }
#feedback {
margin-top: 15px; height: 25px; font-weight: bold; font-size: 1rem;
}
/* انیمیشن غول (ساده شده برای موبایل) */
.monster-area {
font-size: 3rem; margin: 10px 0; transition: all 0.5s;
}
</style>
</head>
<body>
<div class="game-container">
<div class="header">
<div class="score-box">امتیاز: <span id="score">0</span></div>
<div style="font-weight: bold; color: var(--accent);">👾 ول ریاضی</div>
</div>
<div class="monster-area" id="monster">👹</div>
<div class="question-card">
<div id="question">? ?</div>
</div>
<div class="options-grid">
<button class="opt-btn" id="opt0" onclick="checkAns(0)"></button>
<button class="opt-btn" id="opt1" onclick="checkAns(1)"></button>
<button class="opt-btn" id="opt2" onclick="checkAns(2)"></button>
<button class="opt-btn" id="opt3" onclick="checkAns(3)"></button>
</div>
<div id="feedback"></div>
</div>
<script>
let score = 0;
let currentAnswer = 0;
let correctIdx = 0;
const questionEl = document.getElementById('question');
const feedbackEl = document.getElementById('feedback');
const scoreEl = document.getElementById('score');
const monsterEl = document.getElementById('monster');
function Game Source: بازی غول ریاضی
Creator: PixelPanda95
Libraries: none
Complexity: moderate (90 lines, 3.2 KB)
The full source code is displayed above on this page.
Remix Instructions
To remix this game, copy the source code above and modify it. Add a ARCADELAB header at the top with "remix_of: game-pixelpanda95-mtbx853u" to link back to the original. Then publish at arcadelab.ai/publish.