From 5068e5f0184077337f3246cbed056dc63eabdb4c Mon Sep 17 00:00:00 2001 From: Jens Tirsvad Nielsen Date: Tue, 13 Oct 2026 14:43:33 +0800 Subject: [PATCH 1/5] Write the wiki pages in three languages Refs #30 Task: MIL-005#1 --- wiki/Home.da.md | 34 ++++++++++++++++++++++++++++++++++ wiki/Home.md | 32 ++++++++++++++++++++++++++++++++ wiki/Home.ms.md | 34 ++++++++++++++++++++++++++++++++++ wiki/_Sidebar.md | 13 +++++++++++++ 4 files changed, 113 insertions(+) create mode 100644 wiki/Home.da.md create mode 100644 wiki/Home.md create mode 100644 wiki/Home.ms.md create mode 100644 wiki/_Sidebar.md diff --git a/wiki/Home.da.md b/wiki/Home.da.md new file mode 100644 index 0000000..e5be6c2 --- /dev/null +++ b/wiki/Home.da.md @@ -0,0 +1,34 @@ +> Denne side er genereret fra README.md og wiki/. Ændringer her bliver overskrevet, næste gang wikien udgives. + +> Den engelske side er den gældende; denne oversættelse følger den. + +[English](Home) | Dansk | [Bahasa Melayu](Home.ms) + +# Snake-spillet (dag 24) + +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. + +## Styring + +| Tast | Virkning | +| --- | --- | +| Op, Ned, Venstre, Højre | Drejer slangen | + +Slangen vender aldrig direkte om på sig selv. Når hovedet kommer tættere end 15 pixels på den blå mad, spiser slangen den, vokser med ét led, og scoren stiger med 1. + +## Highscore-filen + +Highscoren gemmes som tekst i `data.txt` i den mappe, du starter spillet fra. Filen oprettes med `0` første gang. Vil du starte fra nul igen, så luk spillet og slet filen. + +## Kør spillet + +Der skal bruges Python 3.13 eller nyere med `tkinter`; spillet har ingen andre afhængigheder ved kørsel. + +```bash +git clone https://git.tirsystem.com/Tirsvad-Udemy-100-days-of-code/024-snake.git +cd 024-snake +python -m pip install -e . +python -m snake_game +``` + +Repositoriets README har den fulde opsætning til Windows, Linux og macOS. diff --git a/wiki/Home.md b/wiki/Home.md new file mode 100644 index 0000000..b6ec8ef --- /dev/null +++ b/wiki/Home.md @@ -0,0 +1,32 @@ +> This page is generated from README.md and wiki/. Changes made here are overwritten the next time the wiki is published. + +English | [Dansk](Home.da) | [Bahasa Melayu](Home.ms) + +# Snake Game (Day 24) + +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. + +## Controls + +| Key | Effect | +| --- | --- | +| Up, Down, Left, Right | Turn the snake | + +The snake never turns straight back onto itself. When the head comes closer than 15 pixels to the blue food the snake eats it, grows by one segment and the score goes up by 1. + +## The high score file + +The high score is stored as text in `data.txt` in the folder you start the game from. It is created holding `0` the first time. To start from zero again, close the game and delete the file. + +## Run + +Python 3.13 or newer with `tkinter` is needed; the game has no other runtime dependencies. + +```bash +git clone https://git.tirsystem.com/Tirsvad-Udemy-100-days-of-code/024-snake.git +cd 024-snake +python -m pip install -e . +python -m snake_game +``` + +The README of the repository has the full set-up for Windows, Linux and macOS. diff --git a/wiki/Home.ms.md b/wiki/Home.ms.md new file mode 100644 index 0000000..99e4485 --- /dev/null +++ b/wiki/Home.ms.md @@ -0,0 +1,34 @@ +> Halaman ini dijana daripada README.md dan wiki/. Perubahan di sini akan ditimpa apabila wiki diterbitkan lagi. + +> Halaman Bahasa Inggeris adalah yang rasmi; terjemahan ini mengikutinya. + +[English](Home) | [Dansk](Home.da) | Bahasa Melayu + +# Permainan Ular (hari 24) + +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. + +## Kawalan + +| Kekunci | Kesan | +| --- | --- | +| Atas, Bawah, Kiri, Kanan | Memusingkan ular | + +Ular tidak pernah berpusing terus ke belakang ke atas dirinya sendiri. Apabila kepala menghampiri makanan biru dalam jarak kurang daripada 15 piksel, ular memakannya, bertambah panjang satu segmen dan skor naik 1. + +## Fail skor tertinggi + +Skor tertinggi disimpan sebagai teks dalam `data.txt` di folder tempat anda memulakan permainan. Fail itu dicipta dengan nilai `0` kali pertama. Untuk bermula dari sifar semula, tutup permainan dan padam fail itu. + +## Jalankan + +Python 3.13 atau lebih baharu dengan `tkinter` diperlukan; permainan ini tiada kebergantungan lain semasa dijalankan. + +```bash +git clone https://git.tirsystem.com/Tirsvad-Udemy-100-days-of-code/024-snake.git +cd 024-snake +python -m pip install -e . +python -m snake_game +``` + +README repositori mempunyai persediaan penuh untuk Windows, Linux dan macOS. diff --git a/wiki/_Sidebar.md b/wiki/_Sidebar.md new file mode 100644 index 0000000..5d7482c --- /dev/null +++ b/wiki/_Sidebar.md @@ -0,0 +1,13 @@ +**Snake Game (Day 24)** + +English + +- [Home](Home) + +Dansk + +- [Hjem](Home.da) + +Bahasa Melayu + +- [Utama](Home.ms) -- 2.54.0 From 8a72dd311eecad066d4aa69cf429b6962d017a1a Mon Sep 17 00:00:00 2001 From: Jens Tirsvad Nielsen Date: Tue, 13 Oct 2026 14:43:34 +0800 Subject: [PATCH 2/5] Add the wiki publish marker Refs #31 Task: MIL-005#2 --- wiki/.publish | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 wiki/.publish diff --git a/wiki/.publish b/wiki/.publish new file mode 100644 index 0000000..e69de29 -- 2.54.0 From e0a17a505f063fb973e2dfcec18fa48be40ae190 Mon Sep 17 00:00:00 2001 From: Jens Tirsvad Nielsen Date: Tue, 13 Oct 2026 14:43:34 +0800 Subject: [PATCH 3/5] Finish the README Refs #32 Task: MIL-005#3 --- README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index aa7b7d2..8f5bb1a 100644 --- a/README.md +++ b/README.md @@ -19,10 +19,10 @@ This repository continues and starts from its finished game; `docs/project-plan.md` tells how the work is split into milestones. -> **Status:** in progress. The game of day 21 is adopted, follows the day-24 -> lectures on continuous play and the high score, and now keeps the high score in -> the file `data.txt`. The wiki in three languages (milestone 5) follows. The -> sections below describe the game as it is now. +> **Status:** finished. The game of day 21 is adopted and follows the day-24 +> lectures: continuous play, a high score next to the score, and the high score +> kept in the file `data.txt`. A short description of the game in English, Danish +> and Bahasa Melayu is on the wiki of the repository (the pages are in `wiki/`). ## Requirements @@ -182,6 +182,7 @@ The HTML is written to `build/doxygen/index.html`. A warning fails the build. │ └── snake.py the Snake class ├── tests/ pytest tests (fakes.py holds the fake turtle and screen; │ conftest.py runs every test in a temporary folder) +├── wiki/ wiki pages in English, Danish and Bahasa Melayu ├── Doxyfile source documentation settings ├── LICENSE ├── pyproject.toml project configuration -- 2.54.0 From 74ee862db19c51af768ea7feeb82f2cac2a0b11d Mon Sep 17 00:00:00 2001 From: Jens Tirsvad Nielsen Date: Tue, 13 Oct 2026 14:43:35 +0800 Subject: [PATCH 4/5] Record the review of the MIL-005 code (RC-013) --- docs/artifact-registry.md | 2 +- docs/sqa/reviews/rc-013-mil-005-code.md | 59 +++++++++++++++++++++++++ 2 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 docs/sqa/reviews/rc-013-mil-005-code.md diff --git a/docs/artifact-registry.md b/docs/artifact-registry.md index e1c53ba..18f17c8 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 | 006 | | DICT | Domain Dictionary | docs/dictionary.md | 002 | -| RC | SQA Review Record | docs/sqa/reviews/rc-*.md | 013 | +| RC | SQA Review Record | docs/sqa/reviews/rc-*.md | 014 | ## Languages diff --git a/docs/sqa/reviews/rc-013-mil-005-code.md b/docs/sqa/reviews/rc-013-mil-005-code.md new file mode 100644 index 0000000..e1c2f45 --- /dev/null +++ b/docs/sqa/reviews/rc-013-mil-005-code.md @@ -0,0 +1,59 @@ +# RC-013: Code review of MIL-005 (wiki and finish: no Python change) + +## Metadata +| Key | Value | +| --- | --- | +| ID | RC-013 | +| CrossReference | [MIL-005], [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 | pending | + +--- + +## Artifact Under Review + +- Instance reviewed: the source and tests that [MIL-005] delivers (wiki and finish: 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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-005]: ../../milestones/mil-005-wiki-and-finish.md +[QC-PY-001]: ../../../framework/qc/code/qc-programming-python.md -- 2.54.0 From 5029f19dff74ffb746f2ee718048617c83eee72d Mon Sep 17 00:00:00 2001 From: Jens Tirsvad Nielsen Date: Tue, 13 Oct 2026 14:43:37 +0800 Subject: [PATCH 5/5] Resolve pending commit links --- docs/sqa/reviews/rc-013-mil-005-code.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/sqa/reviews/rc-013-mil-005-code.md b/docs/sqa/reviews/rc-013-mil-005-code.md index e1c2f45..f934eaf 100644 --- a/docs/sqa/reviews/rc-013-mil-005-code.md +++ b/docs/sqa/reviews/rc-013-mil-005-code.md @@ -9,7 +9,7 @@ ## Version History | Date | Status | Author | Reviewer | Change | Commit | | --- | --- | --- | --- | --- | --- | -| 2026-10-13 | Proposed | Jens Tirsvad Nielsen | AI as stand-in for S01 | Initial version | pending | +| 2026-10-13 | Proposed | Jens Tirsvad Nielsen | AI as stand-in for S01 | Initial version | [74ee862] | --- @@ -57,3 +57,4 @@ Go — no Python file changed in this milestone, so every criterion is not appli [MIL-005]: ../../milestones/mil-005-wiki-and-finish.md [QC-PY-001]: ../../../framework/qc/code/qc-programming-python.md +[74ee862]: https://git.tirsystem.com/Tirsvad-Udemy-100-days-of-code/024-snake/commit/74ee862db19c51af768ea7feeb82f2cac2a0b11d -- 2.54.0