Skip to content

Mystake script #601

@marouanemarsite-a11y

Description

@marouanemarsite-a11y
<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>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions