MIL-002 Game logic: data, art, constants and pure functions #24

Merged
Tirsvad merged 2 commits from mil-002-game-logic into main 2026-10-04 17:36:12 +02:00
Owner

Summary

Delivers MIL-002 Game logic: data, art, constants and the pure game functions, with tests.

  • game_data.py: the 50 assignment accounts, verbatim, with an Account TypedDict
  • art.py: logo and vs, unchanged
  • constants.py: account keys, choices, start score and message texts
  • game_logic.py: get_random_account, pick_pair (never the same account twice), format_data, check_answer (either choice is right on a tie)
  • pytest tests for the data shape, art, pair selection, formatting and answer checking
  • MIL-002 reviewed (RC-005, Go) and Accepted; added to the Traceability Matrix

Verification

pytest: 22 passed. doxygen Doxyfile: no warnings. No runtime dependencies added. .env is not referenced under src/ or tests/.

Notes

  • The art is built from concatenated raw lines so backslashes survive and Doxygen does not read the backticks as markup.
  • Author and reviewer are both S01 (single participant); noted in RC-005.

Closes #6
Closes #7
Closes #8
Closes #9
Closes #10
Closes #11

## Summary Delivers MIL-002 Game logic: data, art, constants and the pure game functions, with tests. - `game_data.py`: the 50 assignment accounts, verbatim, with an `Account` TypedDict - `art.py`: `logo` and `vs`, unchanged - `constants.py`: account keys, choices, start score and message texts - `game_logic.py`: `get_random_account`, `pick_pair` (never the same account twice), `format_data`, `check_answer` (either choice is right on a tie) - pytest tests for the data shape, art, pair selection, formatting and answer checking - MIL-002 reviewed (RC-005, Go) and Accepted; added to the Traceability Matrix ## Verification `pytest`: 22 passed. `doxygen Doxyfile`: no warnings. No runtime dependencies added. `.env` is not referenced under `src/` or `tests/`. ## Notes - The art is built from concatenated raw lines so backslashes survive and Doxygen does not read the backticks as markup. - Author and reviewer are both S01 (single participant); noted in RC-005. Closes #6 Closes #7 Closes #8 Closes #9 Closes #10 Closes #11
Tirsvad added 1 commit 2026-10-04 17:35:41 +02:00
Add the assignment data set (50 accounts), the logo and vs art, the
constants module, and the pure functions get_random_account,
pick_pair, format_data and check_answer, all with Doxygen comments.
pick_pair never returns the same account twice; check_answer accepts
either choice on a tie. Cover them with pytest tests (22 passing).

The art is built from concatenated raw lines so the backslashes survive
and Doxygen does not read the backticks as markup.

Accept MIL-002 after review RC-005 and add it to the Traceability
Matrix.

Task: MIL-002#1
Task: MIL-002#2
Task: MIL-002#3
Task: MIL-002#4
Task: MIL-002#5
Task: MIL-002#6
Closes #6
Closes #7
Closes #8
Closes #9
Closes #10
Closes #11
Tirsvad added 1 commit 2026-10-04 17:35:51 +02:00
Tirsvad merged commit 64e3f04c6a into main 2026-10-04 17:36:12 +02:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Tirsvad-Udemy-100_days_of_code/014-higher_lower#24