Files
CoCoCapitalQuiz/CHATGPT_PROMPT.md
T

101 lines
6.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
Build a complete, polished **50 States and Capitals Quiz** in C for the Color Computer 3, using the installed **VCC Plus** and its public MCP interface.
Implement and test the program. Work through sensible stages without stopping for routine implementation decisions.
### Project repository
Use the existing Git checkout on this machine at:
`~/Development/CoCo/CoCoCapitalQuiz`
The checkout is currently empty. Verify its Git root, branch, status and remote before editing, and preserve any work that may have appeared since these instructions were written. Create the quiz project within this checkout. Keep source, assets, attribution, reproducible build instructions and project documentation here; keep generated build outputs appropriately ignored.
### Development environment
- Target a **512 KB CoCo 3 with the 6809 processor**.
- Use VCC Plus’s bundled C toolchain and documented graphics/input facilities. Discover the live MCP capabilities and consult its installed manuals before choosing APIs.
- Use the installed application for builds, execution, captures and debugging. Do not require the VCC Plus source checkout, rebuild the emulator or patch its compilers.
- If the MCP connection is missing, guide me through connecting this C project. Continue independent design and data preparation while waiting.
- Preserve existing files and personal emulator media.
- If a genuine app limitation blocks progress, explain it and propose a reusable enhancement instead of using a private bridge or debugger memory writes.
### Quiz behavior
Include an accurate, verified dataset of **all 50 states and their capitals**. Alaska and Hawaii must be included. Washington, D.C. and territories are not additional questions.
At the beginning, offer:
1. **Multiple choice**
2. **Type the capital**
Shuffle all 50 states for each new quiz. Ask every state exactly once, with no repeats or omissions. Show **Question 1 of 50** through **Question 50 of 50**, along with the current score. Seed the shuffle using available timing and start-input information so ordinary new games do not always repeat the same order.
For each question, display the full state name and ask for its capital.
**Multiple choice:**
- Show four distinct choices: the correct capital and three capitals from other states.
- Randomize the correct answer’s position.
- Accept clearly labeled keyboard selections.
- After answering, explain whether it was correct and show the correct capital before continuing.
**Typed answers:**
- Accept capitals regardless of letter casing.
- Trim surrounding whitespace and tolerate repeated spaces.
- Support spaces, Backspace and Enter with bounded input handling.
- Support legitimate spelling variants such as “Saint Paul,” “St. Paul” and “St Paul.”
- Use a conservative spelling-distance check for answers close to the expected capital, including transposed letters. Say something like: **“That looks close. Check your spelling and try again.”**
- A near match must not automatically earn a point or reveal the correct spelling immediately. Let the player correct it or choose to reveal the answer and move on.
- An exact answer naming another state’s capital should be treated as incorrect, not automatically described as a spelling mistake.
- Count a successfully corrected spelling as correct, but track spelling corrections separately. Award at most one point per state.
### United States map
Use this as the visual reference:
https://www.fla-shop.com/svg/usa/
Display a recognizable U.S. map with state boundaries, including Alaska and Hawaii insets. **Clearly highlight the state currently being asked.** Keep the state name visible in text as well.
Small states must remain identifiable. Automatically show a regional enlargement or detail inset when useful, especially in the Northeast, while retaining enough national context to show where the region belongs.
Adapt the map for the CoCo’s graphics resolution and memory budget. Convert or simplify the source into compact drawing data or indexed graphics during project preparation; do not attempt to render SVG at runtime. Keep geometry, state identities and quiz answers consistently associated so the wrong state cannot be highlighted.
Preserve the map’s required attribution, source URL, license link and notice of adaptations in the project and an accessible credits screen. Keep text readable and use a highlight that stands out against neighboring states.
### Results and navigation
After question 50, show:
- Correct answers out of 50.
- Percentage correct.
- How many correct answers required spelling correction.
- A readable, paginated review of missed states, the player’s answers and the correct capitals.
Offer **Play Again** with a fresh shuffle and **Quit** back to BASIC. Explain controls on the title screen. Prevent a held answer key from accidentally answering the next question or skipping feedback.
### Testing and delivery
Test through the installed VCC Plus MCP tools using ordinary guest input and actual framebuffer captures.
Verify:
- All 50 state/capital pairs and their geometry associations.
- Every state appears once per quiz.
- Question numbering begins at 1 and ends at 50.
- Four unique multiple-choice options and varied answer positions.
- Correct uppercase, lowercase and mixed-case typed answers.
- Multiword capitals, supported aliases, misspellings, transpositions, wrong capitals and long input.
- Accurate scoring, spelling-correction accounting and final review.
- Alaska, Hawaii and small-state highlighting/zoom.
- Replay, key-release handling and clean exit.
Where useful, use verified C-line or function-entry stops and read-only snapshots to inspect quiz state. Use deterministic test seeds for reproducible checks without making ordinary play deterministic. Do not change guest memory or registers to manufacture successful gameplay.
Deliver the editable C project in the existing CoCoCapitalQuiz checkout, map assets and credits, runnable binary/disk image, concise build/play instructions, and a clear account of what actually passed or remains untested.
### Addendum
Without using any of the extra sound cartridges, please add a positive sound when they get a question right and a negative sound when they get a question wrong. At least in multiple choice, after they answer the question, after a brief delay, go to the next question rather than requiring a key to continue.