diff --git a/README.md b/README.md index 8f5bb1a..0b8619a 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,11 @@ The game has no runtime dependencies. The code keeps the names of the lectures `increase_score`, `update_scoreboard`, `high_score`) so that you can compare it with your own solution. +![The game at a score of 5 with a high score of 12: a light green snake with a dark green head and a mouth, blue food and the scores at the top](docs/images/snake-score-5.png) + +*The running game at a score of 5 with a high score of 12: a light green body, a dark +green head with a mouth, the blue food and the white scoreboard.* + This repository continues [021-snake-game](https://git.tirsystem.com/Tirsvad-Udemy-100-days-of-code/021-snake-game) and starts from its finished game; `docs/project-plan.md` tells how the work is diff --git a/docs/artifact-registry.md b/docs/artifact-registry.md index 1f62f99..0758f2a 100644 --- a/docs/artifact-registry.md +++ b/docs/artifact-registry.md @@ -16,7 +16,7 @@ document of a type. `Primary File` may contain a glob (e.g. | PP | Project Plan | docs/project-plan.md | 002 | | MIL | Milestone / Gateway | docs/milestones/*.md | 007 | | DICT | Domain Dictionary | docs/dictionary.md | 002 | -| RC | SQA Review Record | docs/sqa/reviews/rc-*.md | 018 | +| RC | SQA Review Record | docs/sqa/reviews/rc-*.md | 019 | ## Languages diff --git a/docs/images/snake-score-5.png b/docs/images/snake-score-5.png new file mode 100644 index 0000000..4306ff2 Binary files /dev/null and b/docs/images/snake-score-5.png differ diff --git a/docs/sqa/reviews/rc-018-mil-006-code.md b/docs/sqa/reviews/rc-018-mil-006-code.md new file mode 100644 index 0000000..7b251da --- /dev/null +++ b/docs/sqa/reviews/rc-018-mil-006-code.md @@ -0,0 +1,60 @@ +# RC-018: Code review of MIL-006 (screenshot: no Python change) + +## Metadata +| Key | Value | +| --- | --- | +| ID | RC-018 | +| CrossReference | [MIL-006], [QC-PY-001] | + +## Version History +| Date | Status | Author | Reviewer | Change | Commit | +| --- | --- | --- | --- | --- | --- | +| 2026-10-13 | Proposed | Jens Tirsvad Nielsen | AI as stand-in for S01 | Initial version | [4a84314] | + +--- + +## Artifact Under Review + +- Instance reviewed: the source and tests that [MIL-006] delivers (screenshot: no Python change) +- Checklist used: [QC-PY-001] +- Scope: full review of the files changed on the branch of the milestone: no Python file is among them +- Language and domain: n/a +- Language reviewer: none +- Mode: autonomous, not independent (the reviewer is `AI as stand-in for S01`; the assistant also wrote the code) + +## Checklist Results + +| # | Criterion | Status | Evidence/Notes | +| --- | --- | --- | --- | +| 1 | Packages, modules, functions, variables, classes and constants follow PEP 8 casing (`snake_case`, `PascalCase`, `UPPER_SNAKE`) | N-A | No Python file changed on this branch (`git diff main --stat` shows the PNG, README.md and wiki/ only); the code of the repository was reviewed in RC-009 to RC-012. | +| 2 | Names state purpose in the domain's language; no unexplained abbreviations, no single-letter names outside tiny scopes | N-A | No Python file changed on this branch (`git diff main --stat` shows the PNG, README.md and wiki/ only); the code of the repository was reviewed in RC-009 to RC-012. | +| 3 | Code is produced by the project's formatter and passes its linter with no unexplained suppressions | N-A | No Python file changed on this branch (`git diff main --stat` shows the PNG, README.md and wiki/ only); the code of the repository was reviewed in RC-009 to RC-012. | +| 4 | Every function and method signature is type-annotated, including `-> None` | N-A | No Python file changed on this branch (`git diff main --stat` shows the PNG, README.md and wiki/ only); the code of the repository was reviewed in RC-009 to RC-012. | +| 5 | No bare `except:`, no swallowed exceptions; specific exceptions are raised and the cause is kept (`raise ... from`) | N-A | No Python file changed on this branch (`git diff main --stat` shows the PNG, README.md and wiki/ only); the code of the repository was reviewed in RC-009 to RC-012. | +| 6 | No mutable default arguments and no shadowed builtins | N-A | No Python file changed on this branch (`git diff main --stat` shows the PNG, README.md and wiki/ only); the code of the repository was reviewed in RC-009 to RC-012. | +| 7 | Files, locks and connections are managed with context managers | N-A | No Python file changed on this branch (`git diff main --stat` shows the PNG, README.md and wiki/ only); the code of the repository was reviewed in RC-009 to RC-012. | +| 8 | Public modules, classes and functions have docstrings that say what, not how | N-A | No Python file changed on this branch (`git diff main --stat` shows the PNG, README.md and wiki/ only); the code of the repository was reviewed in RC-009 to RC-012. | +| 9 | Logging uses `logging`, not `print`; no secrets or personal data in log output | N-A | No Python file changed on this branch (`git diff main --stat` shows the PNG, README.md and wiki/ only); the code of the repository was reviewed in RC-009 to RC-012. | +| 10 | Classes and operations trace to the Design Class Diagram they implement; deviations are recorded | N-A | No Python file changed on this branch (`git diff main --stat` shows the PNG, README.md and wiki/ only); the code of the repository was reviewed in RC-009 to RC-012. | +| 11 | Tests exist for new behaviour, are named for the behaviour, and do not depend on order or the network | N-A | No Python file changed on this branch (`git diff main --stat` shows the PNG, README.md and wiki/ only); the code of the repository was reviewed in RC-009 to RC-012. | +| 12 | Type checker runs in strict mode without errors; `Any` is justified in a comment | N-A | No Python file changed on this branch (`git diff main --stat` shows the PNG, README.md and wiki/ only); the code of the repository was reviewed in RC-009 to RC-012. | +| 13 | Dependencies are declared and pinned in the project's dependency file, none unused | N-A | No Python file changed on this branch (`git diff main --stat` shows the PNG, README.md and wiki/ only); the code of the repository was reviewed in RC-009 to RC-012. | +| 14 | Each piece of knowledge (a business rule, constant, format, validation or query) is defined in one place; code is merged only where it expresses the same knowledge, not where it merely looks alike | N-A | No Python file changed on this branch (`git diff main --stat` shows the PNG, README.md and wiki/ only); the code of the repository was reviewed in RC-009 to RC-012. | +| 15 | Imports point inward: business-rule modules import no framework, database, UI or delivery-mechanism code, and there are no import cycles | N-A | No Python file changed on this branch (`git diff main --stat` shows the PNG, README.md and wiki/ only); the code of the repository was reviewed in RC-009 to RC-012. | +| 16 | SOLID holds: a class or module has one reason to change; new behaviour is added by extension, not by editing a type test in several places; subclasses honour the contract of their base; protocols are narrow; high-level code depends on protocols or abstract types and receives its implementations | N-A | No Python file changed on this branch (`git diff main --stat` shows the PNG, README.md and wiki/ only); the code of the repository was reviewed in RC-009 to RC-012. | + +## Overall Verdict + +Go — no Python file changed in this milestone, so every criterion is not applicable; the repository's code stands on RC-009 to RC-012. Assessed on 2026-10-13 by the assistant that wrote the code, as stand-in for S01 in autonomous mode. Mode: autonomous, not independent. The pull request is the second look. + +## Action Items + +| Action | Owner | Due | +| --- | --- | --- | +| Challenge this `Go` in the run summary or on the pull request if the stand-in decision is not wanted | S01 | 2026-10-20 | + +--- + +[MIL-006]: ../../milestones/mil-006-screenshot.md +[QC-PY-001]: ../../../framework/qc/code/qc-programming-python.md +[4a84314]: https://git.tirsystem.com/Tirsvad-Udemy-100-days-of-code/024-snake/commit/4a84314ab4dc5365a16a1ef844a1421eee429d0f diff --git a/wiki/Home.da.md b/wiki/Home.da.md index e5be6c2..7a26d53 100644 --- a/wiki/Home.da.md +++ b/wiki/Home.da.md @@ -8,6 +8,10 @@ Det klassiske Snake-spil, bygget med Pythons `turtle`-modul. Det er opgaven fra dag 24 i Udemys *100 Days of Code: The Complete Python Pro Bootcamp*, som handler om det lokale filsystem og om at læse og skrive filer. En slange bevæger sig af sig selv hen over en sort skærm på 600 gange 600 og styres med piletasterne; den spiser mad og vokser, og tavlen øverst viser scoren og highscoren. Spillet slutter ikke: når hovedet passerer væggen eller rører sin egen hale, starter slangen og scoren forfra, og den bedste score gemmes i filen `data.txt`, så den stadig er der, næste gang du spiller. +![Spillet ved en score på 5 og en highscore på 12: en lysegrøn slange med et mørkegrønt hoved og en mund, blå mad og tallene øverst](https://git.tirsystem.com/Tirsvad-Udemy-100-days-of-code/024-snake/raw/branch/main/docs/images/snake-score-5.png) + +*Det kørende spil ved en score på 5 og en highscore på 12: en lysegrøn krop, et mørkegrønt hoved med en mund, den blå mad og den hvide tavle.* + ## Styring | Tast | Virkning | diff --git a/wiki/Home.md b/wiki/Home.md index b6ec8ef..7bc17cf 100644 --- a/wiki/Home.md +++ b/wiki/Home.md @@ -6,6 +6,10 @@ English | [Dansk](Home.da) | [Bahasa Melayu](Home.ms) The classic Snake game, built with Python's `turtle` module. It is the day-24 assignment of Udemy's *100 Days of Code: The Complete Python Pro Bootcamp*, which teaches the local file system and reading and writing files. A snake moves across a black 600 by 600 screen by itself and is steered with the arrow keys; it eats food, grows, and the scoreboard at the top shows the score and the high score. The game does not end: when the head passes the wall or touches its own tail, the snake and the score start again, and the best score is kept in the file `data.txt`, so it is still there the next time you play. +![The game at a score of 5 with a high score of 12: a light green snake with a dark green head and a mouth, blue food and the scores at the top](https://git.tirsystem.com/Tirsvad-Udemy-100-days-of-code/024-snake/raw/branch/main/docs/images/snake-score-5.png) + +*The running game at a score of 5 with a high score of 12: a light green body, a dark green head with a mouth, the blue food and the white scoreboard.* + ## Controls | Key | Effect | diff --git a/wiki/Home.ms.md b/wiki/Home.ms.md index 99e4485..1249f4c 100644 --- a/wiki/Home.ms.md +++ b/wiki/Home.ms.md @@ -8,6 +8,10 @@ Permainan Ular (Snake) klasik, dibina dengan modul `turtle` Python. Ia ialah tugasan hari ke-24 dalam *100 Days of Code: The Complete Python Pro Bootcamp* di Udemy, yang mengajar sistem fail setempat serta cara membaca dan menulis fail. Seekor ular bergerak sendiri merentasi skrin hitam 600 kali 600 dan dikawal dengan kekunci anak panah; ia makan makanan dan membesar, dan papan skor di bahagian atas memaparkan skor serta skor tertinggi. Permainan tidak tamat: apabila kepala melepasi dinding atau menyentuh ekornya sendiri, ular dan skor bermula semula, dan skor terbaik disimpan dalam fail `data.txt`, jadi ia masih ada apabila anda bermain lagi. +![Permainan pada skor 5 dengan skor tertinggi 12: seekor ular hijau muda dengan kepala hijau tua dan mulut, makanan biru dan skor di bahagian atas](https://git.tirsystem.com/Tirsvad-Udemy-100-days-of-code/024-snake/raw/branch/main/docs/images/snake-score-5.png) + +*Permainan yang sedang berjalan pada skor 5 dengan skor tertinggi 12: badan hijau muda, kepala hijau tua dengan mulut, makanan biru dan papan skor putih.* + ## Kawalan | Kekunci | Kesan |