-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Open
Description
<title>Chicken Practice</title>
<style>
body {
background: #0b1220;
color: white;
text-align: center;
font-family: Arial;
}
.grid {
display: grid;
grid-template-columns: repeat(5, 60px);
gap: 15px;
justify-content: center;
margin-top: 30px;
}
.tile {
width: 60px;
height: 60px;
background: #ccc;
border-radius: 10px;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
font-size: 20px;
}
button {
margin-top: 20px;
padding: 10px 20px;
background: #7CFC00;
border: none;
font-size: 18px;
}
</style>
🐔 Chicken Practice
اختار البلاصة وشوف واش فيها 🍗 ولا 🦴
Start Game
<script> let bones = []; function startGame() { const grid = document.getElementById("grid"); grid.innerHTML = ""; bones = []; // تختار 5 أماكن عشوائياً للعظام while (bones.length < 5) { let r = Math.floor(Math.random() * 25); if (!bones.includes(r)) bones.push(r); } for (let i = 0; i < 25; i++) { let tile = document.createElement("div"); tile.className = "tile"; tile.onclick = () => { if (bones.includes(i)) { tile.innerHTML = "🦴"; tile.style.background = "red"; } else { tile.innerHTML = "🍗"; tile.style.background = "green"; } }; // 👇 هذا هو السر: يبيّن لك أماكن العظام مباشرة if (bones.includes(i)) { tile.style.border = "2px solid yellow"; } grid.appendChild(tile); } } </script>Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels