Skip to content

feat: add Scavenger Hunt game mode#1

Draft
Copilot wants to merge 2 commits into
mainfrom
copilot/build-something-new
Draft

feat: add Scavenger Hunt game mode#1
Copilot wants to merge 2 commits into
mainfrom
copilot/build-something-new

Conversation

Copy link
Copy Markdown

Copilot AI commented Apr 20, 2026

Adds a second game mode — Scavenger Hunt — alongside the existing Bingo mode. Players get the same question pool as a scrollable checklist with a live progress bar instead of a 5×5 grid.

Data model

  • New GameMode enum (BINGO / SCAVENGER_HUNT) and ScavengerItem Pydantic model in models.py

Game logic (game_logic.py)

  • generate_checklist() — shuffles all 24 questions into a flat ScavengerItem list
  • toggle_item() — immutable toggle (mirrors existing toggle_square pattern)

Session (game_service.py)

  • start_scavenger_hunt(), handle_item_click() methods on GameSession
  • Computed properties checked_count / progress_percent drive the progress bar

Routes (main.py)

  • POST /start-scavenger-hunt → renders scavenger_screen.html
  • POST /toggle-item/{item_id} → toggles item, re-renders screen

Templates & CSS

  • start_screen.html — now shows two mode buttons (🎲 Play Bingo / 🔍 Scavenger Hunt)
  • New scavenger_screen.html — checklist with animated CSS progress bar
  • app.css — added w-6, h-2, h-6, flex-shrink-0, overflow-auto utilities
Original prompt

I want to create nothing new for now. enough code has been written in last 1 year. Well, lets build something.

- Add GameMode enum and ScavengerItem model to models.py
- Add generate_checklist() and toggle_item() to game_logic.py
- Update GameSession with scavenger hunt support (start_scavenger_hunt,
  handle_item_click, checked_count, progress_percent)
- Add /start-scavenger-hunt and /toggle-item/{item_id} routes
- Update start screen with mode selection (Bingo vs Scavenger Hunt)
- Add scavenger_screen.html template with checklist and progress bar
- Add CSS utility classes (w-6, h-2, h-6, flex-shrink-0, overflow-auto)
- Add tests for new game logic and API routes (39 total, all passing)

Agent-Logs-Url: https://github.com/prashantchahar/my-soc-ops-python/sessions/da4dff2d-850b-4db2-9521-3171e26f4256

Co-authored-by: prashantchahar <19215720+prashantchahar@users.noreply.github.com>
Copilot AI changed the title [WIP] Build new features based on recent code feat: add Scavenger Hunt game mode Apr 20, 2026
Copilot AI requested a review from prashantchahar April 20, 2026 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants