Skip to content

[rig-game-gen] Daily rig game generation — 2026-08-09 — passed #388

Description

@github-actions

Game Concept

Title: Number Guesser
Genre: Puzzle

A browser-based number guessing game where the player tries to guess a secret number between 1 and 100. After each guess the game responds with 'too high' or 'too low' hints and tracks the total number of attempts until the player finds the answer.

Result Summary

  • Typecheck passed: ✅ Yes
  • Execution passed: ✅ Yes

Attempts

Attempt 1/2

  • Typecheck: ✅ Passed
  • Execution: ✅ Passed

Final Generated Rig Program

rig program source
import * as fs from "fs";

const GAME_CODE = `<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Number Guesser</title>
  <style>
    body { font-family: Arial, sans-serif; max-width: 500px; margin: 50px auto; text-align: center; background: #1a1a2e; color: #eee; }
    h1 { color: #e94560; }
    input { padding: 10px; font-size: 1.2em; width: 100px; border-radius: 8px; border: 2px solid #e94560; background: #16213e; color: #eee; text-align: center; }
    button { padding: 10px 20px; font-size: 1.1em; margin: 10px; border-radius: 8px; border: none; background: #e94560; color: white; cursor: pointer; }
    #message { font-size: 1.4em; margin: 20px; min-height: 2em; }
    #attempts { color: #aaa; }
    .win { color: #4ecca3; }
  </style>
</head>
<body>
  <h1>🎯 Number Guesser</h1>
  <p>Guess a number between <b>1</b> and <b>100</b></p>
  <input type="number" id="guessInput" min="1" max="100" placeholder="?" />
  <br/>
  <button onclick="makeGuess()">Guess!</button>
  <button onclick="newGame()">New Game</button>
  <div id="message">Good luck!</div>
  <div id="attempts"></div>
  <script>
    let secret = Math.floor(Math.random() * 100) + 1;
    let attempts = 0;
    let gameOver = false;
    function makeGuess() {
      if (gameOver) return;
      const input = document.getElementById('guessInput');
      const guess = parseInt(input.value);
      if (!guess || guess < 1 || guess > 100) { document.getElementById('message').textContent = 'Enter 1-100!'; return; }
      attempts++;
      document.getElementById('attempts').textContent = 'Attempts: ' + attempts;
      if (guess === secret) {
        document.getElementById('message').innerHTML = '<span class="win">🎉 Correct! The number was ' + secret + '!</span>';
        gameOver = true;
      } else {
        document.getElementById('message').textContent = guess < secret ? '📈 Too low!' : '📉 Too high!';
      }
      input.value = '';
    }
    function newGame() {
      secret = Math.floor(Math.random() * 100) + 1;
      attempts = 0; gameOver = false;
      document.getElementById('message').textContent = 'Good luck!';
      document.getElementById('attempts').textContent = '';
    }
    document.getElementById('guessInput').addEventListener('keydown', e => { if (e.key === 'Enter') makeGuess(); });
  </script>
</body>
</html>`;

fs.writeFileSync("number-guesser.html", GAME_CODE);
console.log("Done");

Final Generated Game: number-guesser.html

Game source (html)
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Number Guesser</title>
  <style>
    body { font-family: Arial, sans-serif; max-width: 500px; margin: 50px auto; text-align: center; background: #1a1a2e; color: #eee; }
    h1 { color: #e94560; }
    input { padding: 10px; font-size: 1.2em; width: 100px; border-radius: 8px; border: 2px solid #e94560; background: #16213e; color: #eee; text-align: center; }
    button { padding: 10px 20px; font-size: 1.1em; margin: 10px; border-radius: 8px; border: none; background: #e94560; color: white; cursor: pointer; }
    #message { font-size: 1.4em; margin: 20px; min-height: 2em; }
    #attempts { color: #aaa; }
    .win { color: #4ecca3; }
  </style>
</head>
<body>
  <h1>🎯 Number Guesser</h1>
  <p>Guess a number between <b>1</b> and <b>100</b></p>
  <input type="number" id="guessInput" min="1" max="100" placeholder="?" />
  <br/>
  <button onclick="makeGuess()">Guess!</button>
  <button onclick="newGame()">New Game</button>
  <div id="message">Good luck!</div>
  <div id="attempts"></div>
  <script>
    let secret = Math.floor(Math.random() * 100) + 1;
    let attempts = 0;
    let gameOver = false;
    function makeGuess() {
      if (gameOver) return;
      const input = document.getElementById('guessInput');
      const guess = parseInt(input.value);
      if (!guess || guess < 1 || guess > 100) { document.getElementById('message').textContent = 'Enter 1-100!'; return; }
      attempts++;
      document.getElementById('attempts').textContent = 'Attempts: ' + attempts;
      if (guess === secret) {
        document.getElementById('message').innerHTML = '<span class="win">🎉 Correct! The number was ' + secret + '!</span>';
        gameOver = true;
      } else {
        document.getElementById('message').textContent = guess < secret ? '📈 Too low!' : '📉 Too high!';
      }
      input.value = '';
    }
    function newGame() {
      secret = Math.floor(Math.random() * 100) + 1;
      attempts = 0; gameOver = false;
      document.getElementById('message').textContent = 'Good luck!';
      document.getElementById('attempts').textContent = '';
    }
    document.getElementById('guessInput').addEventListener('keydown', e => { if (e.key === 'Enter') makeGuess(); });
  </script>
</body>
</html>

✅ Passed on attempt 1/2

Generated by Daily Rig Game Generator · sonnet46 582.6 AIC · ⌖ 7.55 AIC · ⊞ 6.6K ·

  • expires on Aug 16, 2026, 4:56 PM UTC

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions