diff --git a/README.md b/README.md index 9f63632..6d19679 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,11 @@ A quiz game from Udemy's *100 Days of Code: The Complete Python Pro Bootcamp* (day 25): a Turtle window shows a blank map of the United States, you type state names, and every correct guess appears on the map. When you leave, the states you missed are saved to `states_to_learn.csv`. -> **Status:** under construction. The tooling and layout are in place; the game logic and the Turtle screen follow in the next milestones. +![The blank map with the prompt at 0/50 states](docs/images/game-start.png) + +![A game in progress: 14 of 50 states named](docs/images/game-in-progress.png) + +This is a solution for course participants to compare with their own: the code keeps the assignment's names (`screen`, `guessed_states`, `missing_states`, `get_mouse_click_coor`, `states_to_learn.csv`). It reads the CSV with the standard library, so the game has no runtime dependencies. The wiki has the same instructions in English, Danish and Bahasa Malaysia. ## Requirements @@ -60,7 +64,15 @@ With the virtual environment active: python -m us_states_game ``` -Type a state name in the prompt. Type `exit` to quit; the states you did not name are written to `states_to_learn.csv` in the current folder. +Type a state name in the prompt; case does not matter. The title of the prompt shows how many states you have named. Type `exit` (or press Cancel) to quit; the states you did not name are written to `states_to_learn.csv` in the current folder. + +To print the coordinates of every mouse click on the map (lecture 1), add `--show-coordinates`: + +```bash +python -m us_states_game --show-coordinates +``` + +The game can also be started with `python src/us_states_game/main.py`. ## Run the tests @@ -88,9 +100,11 @@ Open `docs/build/doxygen/index.html` in a browser. | Path | What it is | | --- | --- | -| `src/us_states_game/` | The game package: constants, game logic and the Turtle screen | +| `src/us_states_game/` | The game package: `constants.py`, `states.py` (rules), `storage.py` (CSV), `game.py` (guess loop), `turtle_screen.py` (Turtle), `main.py` (entry point) | | `src/us_states_game/data/` | `50_states.csv` and `blank_states_img.gif` from the course | -| `tests/` | pytest tests | +| `tests/` | pytest tests; they need no display | +| `wiki/` | The wiki pages in English (`*.md`), Danish (`*.da.md`) and Bahasa Malaysia (`*.ms.md`) | +| `docs/images/` | Screenshots used by the README and the wiki | | `docs/` | Project documents: business case, plan, milestones, review records | | `Doxyfile` | Doxygen configuration | | `pyproject.toml` | Project configuration | diff --git a/docs/artifact-registry.md b/docs/artifact-registry.md index 100fcd0..a18b175 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 | 005 | | ADR | Architecture Decision Record | docs/adr/adr-NNNN-*.md | 0002 | -| RC | SQA Review Record | docs/sqa/reviews/rc-*.md | 011 | +| RC | SQA Review Record | docs/sqa/reviews/rc-*.md | 012 | ## Languages diff --git a/docs/images/game-in-progress.png b/docs/images/game-in-progress.png new file mode 100644 index 0000000..01bbe69 Binary files /dev/null and b/docs/images/game-in-progress.png differ diff --git a/docs/images/game-start.png b/docs/images/game-start.png new file mode 100644 index 0000000..fe946c3 Binary files /dev/null and b/docs/images/game-start.png differ diff --git a/docs/milestones/mil-004-docs-release.md b/docs/milestones/mil-004-docs-release.md index fd82abe..63f9aa9 100644 --- a/docs/milestones/mil-004-docs-release.md +++ b/docs/milestones/mil-004-docs-release.md @@ -11,7 +11,8 @@ ## Version History | Date | Status | Author | Reviewer | Change | Commit | | --- | --- | --- | --- | --- | --- | -| 2026-10-13 | Accepted | Claude (AI) for S01 | AI as stand-in for S01 | Initial version; review RC-006: Go | [b113e6e] | +| 2026-10-13 | Deprecated | Claude (AI) for S01 | AI as stand-in for S01 | Initial version; review RC-006: Go | [b113e6e] | +| 2026-10-13 | Accepted | Claude (AI) for S01 | AI as stand-in for S01 | Criterion 1 follows the README template S01 gave in the request, not the framework README template, so `check-readme.sh` cannot pass; review RC-011: Go | pending | --- @@ -27,7 +28,7 @@ Completed README with screenshots, Doxygen comments verified and buildable, wiki | # | Criterion (objectively checkable) | Go | No-Go | | --- | --- | --- | --- | -| 1 | `framework/scripts/check-readme.sh` passes | Met | Not met | +| 1 | `README.md` has every section of the README template S01 gave (Requirements, Set up with Windows powershell, Linux debian and MacOS, Run, Run the tests, Continuous integration, Build the source documentation, Project layout, License) in that order, and no placeholder text | Met | Not met | | 2 | `doxygen Doxyfile` builds without warnings about undocumented public functions | Met | Not met | | 3 | The wiki has `Home`, `Install` and `Description` pages in `en`, `da` and `ms` and a `_Sidebar.md` | Met | Not met | | 4 | README and wiki embed at least 2 screenshots of the running game | Met | Not met | diff --git a/docs/sqa/reviews/rc-011-mil-004-rereview.md b/docs/sqa/reviews/rc-011-mil-004-rereview.md new file mode 100644 index 0000000..a3cb0b2 --- /dev/null +++ b/docs/sqa/reviews/rc-011-mil-004-rereview.md @@ -0,0 +1,67 @@ +# SQA Review Record + +## Metadata +| Key | Value | +| --- | --- | +| ID | RC-011 | +| CrossReference | [QC-MIL-001], [QC-LANG-001] | + +## Version History +| Date | Status | Author | Reviewer | Change | Commit | +| --- | --- | --- | --- | --- | --- | +| 2026-10-13 | Proposed | Claude (AI) for S01 | AI as stand-in for S01 | Initial review record: Go | pending | + +--- + +## Artifact Under Review + +- Instance reviewed: [MIL-004] +- Checklist used: [QC-MIL-001], [QC-LANG-001] +- Scope: full review (re-review after the criterion 1 change; earlier record RC-006) +- Language and domain: en / it +- Language reviewer: none +- Mode: autonomous, not independent (the reviewer is `AI as stand-in for S01`; the author is the same AI) + +## Checklist Results + +### QC-MIL-001 + +| # | Criterion | Status | Evidence/Notes | +| --- | --- | --- | --- | +| 1 | A concrete deliverable is defined for every gate (Mandatory) | Pass | Deliverable: README, Doxygen, screenshots, three-language wiki, fresh-clone run. | +| 2 | Explicit Go/No-Go criteria are stated for each gate (Mandatory) | Pass | Five objectively checkable criteria; criterion 1 now names the exact README sections. | +| 3 | Dependencies on other milestones are explicitly mapped (Optional) | Pass | Depends on MIL-003 with a reason. | +| 4 | Each milestone is traceable to a Business Case objective or KPI (Mandatory) | Pass | Traceable to BC-001 objective 4 and success criteria 3, 4, 5. | +| 5 | Milestone owner and approving reviewer are identified (Mandatory) | Pass | Owner S01, approving reviewer S01 (stand-in). | +| 6 | Milestone has a defined target date consistent with project constraints (Mandatory) | Pass | 2026-10-13, within the duration constraint. | + +### QC-LANG-001 + +| # | Criterion | Status | Evidence/Notes | +| --- | --- | --- | --- | +| 1 | The Metadata table has a `Language` row and a `Domain` row, and neither is a placeholder (Mandatory) | Pass | Language en, Domain it. | +| 2 | `Language` is a BCP 47 code and `Domain` is a value from the registry's domain list (Mandatory) | Pass | BCP 47 code en; domain it is in the registry list. | +| 3 | The content (prose and table cells) is written in the stated language (Mandatory) | Pass | Content is English. | +| 4 | The register matches the one the registry gives for the artifact type (Mandatory) | Pass | IT Executive English register for MIL. | +| 5 | Domain terms are the PO terms of the domain's dictionary, with no synonyms (Mandatory) | Pass | No DICT exists; standard software terms; stand-in decision. | +| 6 | Metadata keys, section headings, IDs and statuses are in English (Mandatory) | Pass | Structural vocabulary English. | +| 7 | No translated twin (`..md`) exists beside the document (Mandatory) | Pass | No translated twin. | +| 8 | A change of language or domain since the previous accepted version has a Version History row and was reviewed again (Mandatory) | Pass | No language change; this review follows a content change recorded in Version History. | +| 9 | A reviewer competent in the domain, and in the language, has confirmed that the domain terms are used correctly (Mandatory) | Pass | Reviewer, AI as stand-in for S01, reads English and the software domain; open to challenge. | +| 10 | Abbreviations are spelled out on first use, in the stated language (Optional) | Pass | Abbreviations spelled out on first use in the milestone documents. | + +## Overall Verdict + +Go - MIL-004 after the criterion 1 change meets every Mandatory criterion. Full re-review: the content changed materially, so no delta review was used. + +## Action Items + +| Action | Owner | Due | +| --- | --- | --- | +| None | S01 | | + +--- + +[QC-MIL-001]: ../../../framework/qc/artifacts/qc-milestones-gateways.md +[QC-LANG-001]: ../../../framework/qc/artifacts/qc-language-domain.md +[MIL-004]: ../../milestones/mil-004-docs-release.md diff --git a/wiki/Description.da.md b/wiki/Description.da.md new file mode 100644 index 0000000..fd36ef6 --- /dev/null +++ b/wiki/Description.da.md @@ -0,0 +1,35 @@ +[English](Description) | **Dansk** | [Bahasa Melayu](Description.ms) + +# Beskrivelse + +Spillet følger de tre lektioner fra dag 25. Denne side forklarer, hvordan koden er bygget. + +## Spilregler + +- Vinduet viser det blanke kort fra `blank_states_img.gif`. +- Promptens titel viser, hvor mange delstater der er navngivet, for eksempel `14/50 States Correct`. +- Et svar matches med en delstat uden hensyn til store og små bogstaver eller mellemrum omkring. +- En rigtig delstat skrives på kortet ved sin `x` og `y` fra `50_states.csv`; et forkert eller gentaget svar spørger igen. +- `exit` eller Annuller afslutter spillet; de delstater, der ikke er navngivet, gemmes i `states_to_learn.csv`. + +## Moduler + +| Modul | Ansvar | +| --- | --- | +| `constants.py` | Alle konstanter: titler, filnavne, kolonnenavne, grænser | +| `states.py` | Reglerne: `State`, `find_state`, `get_missing_states`; ingen filer, ingen skærm | +| `storage.py` | Læser `50_states.csv` og skriver `states_to_learn.csv` med standardbibliotekets `csv`-modul | +| `game.py` | Gætteløkken `play` og `run_game` via en `GameScreen`-protokol | +| `turtle_screen.py` | Det eneste modul, der importerer `turtle`: kort, prompt, delstatsnavne, klikkoordinater | +| `main.py` | Indgangspunkt, der forbinder delene | + +## Tests, CI og dokumentation + +- `python -m pytest` kører testene med en falsk skærm, så intet vindue åbnes. +- `.gitea/workflows/run-tests.yml` kører ruff, mypy, yamllint og pytest ved hvert push og hver pull request. +- `doxygen Doxyfile` bygger kildedokumentationen i `docs/build/doxygen`. + +```bash +python -m pytest +doxygen Doxyfile +``` diff --git a/wiki/Description.md b/wiki/Description.md new file mode 100644 index 0000000..312beba --- /dev/null +++ b/wiki/Description.md @@ -0,0 +1,35 @@ +**English** | [Dansk](Description.da) | [Bahasa Melayu](Description.ms) + +# Description + +The game follows the three lectures of day 25. This page explains how the code is built. + +## Game rules + +- The window shows the blank map from `blank_states_img.gif`. +- The prompt title shows how many states are named, for example `14/50 States Correct`. +- An answer is matched to a state without regard to case or surrounding spaces. +- A correct state is written on the map at its `x` and `y` from `50_states.csv`; a wrong or repeated answer asks again. +- `exit` or Cancel ends the game; the states not named are saved to `states_to_learn.csv`. + +## Modules + +| Module | Responsibility | +| --- | --- | +| `constants.py` | Every constant: titles, file names, column names, limits | +| `states.py` | The rules: `State`, `find_state`, `get_missing_states`; no files, no screen | +| `storage.py` | Reads `50_states.csv` and writes `states_to_learn.csv` with the standard library `csv` module | +| `game.py` | The guess loop `play` and `run_game`, working through a `GameScreen` protocol | +| `turtle_screen.py` | The only module that imports `turtle`: map, prompt, state names, click coordinates | +| `main.py` | Entry point that connects the parts | + +## Tests, CI and documentation + +- `python -m pytest` runs the tests with a fake screen, so no window opens. +- `.gitea/workflows/run-tests.yml` runs ruff, mypy, yamllint and pytest on every push and pull request. +- `doxygen Doxyfile` builds the source documentation into `docs/build/doxygen`. + +```bash +python -m pytest +doxygen Doxyfile +``` diff --git a/wiki/Description.ms.md b/wiki/Description.ms.md new file mode 100644 index 0000000..c2a9f57 --- /dev/null +++ b/wiki/Description.ms.md @@ -0,0 +1,35 @@ +[English](Description) | [Dansk](Description.da) | **Bahasa Melayu** + +# Penerangan + +Permainan ini mengikut tiga kuliah hari 25. Halaman ini menerangkan cara kod dibina. + +## Peraturan permainan + +- Tetingkap memaparkan peta kosong daripada `blank_states_img.gif`. +- Tajuk gesaan menunjukkan bilangan negeri yang dinamakan, contohnya `14/50 States Correct`. +- Jawapan dipadankan dengan negeri tanpa mengira huruf besar atau kecil atau ruang di sekelilingnya. +- Negeri yang betul ditulis pada peta di `x` dan `y` daripada `50_states.csv`; jawapan salah atau berulang ditanya semula. +- `exit` atau Cancel menamatkan permainan; negeri yang tidak dinamakan disimpan dalam `states_to_learn.csv`. + +## Modul + +| Modul | Tanggungjawab | +| --- | --- | +| `constants.py` | Semua pemalar: tajuk, nama fail, nama lajur, had | +| `states.py` | Peraturan: `State`, `find_state`, `get_missing_states`; tiada fail, tiada skrin | +| `storage.py` | Membaca `50_states.csv` dan menulis `states_to_learn.csv` dengan modul `csv` pustaka standard | +| `game.py` | Gelung meneka `play` dan `run_game` melalui protokol `GameScreen` | +| `turtle_screen.py` | Satu-satunya modul yang mengimport `turtle`: peta, gesaan, nama negeri, koordinat klik | +| `main.py` | Titik masuk yang menyambungkan bahagian-bahagian | + +## Ujian, CI dan dokumentasi + +- `python -m pytest` menjalankan ujian dengan skrin palsu, jadi tiada tetingkap dibuka. +- `.gitea/workflows/run-tests.yml` menjalankan ruff, mypy, yamllint dan pytest pada setiap push dan pull request. +- `doxygen Doxyfile` membina dokumentasi sumber ke dalam `docs/build/doxygen`. + +```bash +python -m pytest +doxygen Doxyfile +``` diff --git a/wiki/Home.da.md b/wiki/Home.da.md new file mode 100644 index 0000000..644a5db --- /dev/null +++ b/wiki/Home.da.md @@ -0,0 +1,25 @@ +[English](Home) | **Dansk** | [Bahasa Melayu](Home.ms) + +# U.S. States Game + +Et quizspil fra Udemys *100 Days of Code* (dag 25): navngiv de 50 delstater på et blankt kort over USA. Hvert rigtigt gæt vises på kortet; når du stopper, gemmes de delstater, du missede, i `states_to_learn.csv`. + +![Det blanke kort med prompten ved 0/50 delstater](https://git.tirsystem.com/Tirsvad-Udemy-100-days-of-code/025-us-states-game/raw/branch/main/docs/images/game-start.png) + +![Et spil i gang: 14 af 50 delstater navngivet](https://git.tirsystem.com/Tirsvad-Udemy-100-days-of-code/025-us-states-game/raw/branch/main/docs/images/game-in-progress.png) + +## Kort fortalt + +- Python 3.13 eller nyere, ingen runtime-afhængigheder +- Tests med `pytest`, ingen skærm nødvendig +- Kildedokumentation med Doxygen +- Wiki på engelsk, dansk og bahasa malaysia + +## Sider + +| Page | | +| --- | --- | +| [Installation](Install.da) | Sæt projektet op på Windows, Linux Debian eller MacOS og kør det | +| [Beskrivelse](Description.da) | Hvordan spillet og koden virker: regler, moduler, tests, CI og kildedokumentation | + +[Repository](https://git.tirsystem.com/Tirsvad-Udemy-100-days-of-code/025-us-states-game) diff --git a/wiki/Home.md b/wiki/Home.md new file mode 100644 index 0000000..2aed3b5 --- /dev/null +++ b/wiki/Home.md @@ -0,0 +1,25 @@ +**English** | [Dansk](Home.da) | [Bahasa Melayu](Home.ms) + +# U.S. States Game + +A quiz game from Udemy's *100 Days of Code* (day 25): name the 50 states on a blank map of the United States. Every correct guess appears on the map; when you leave, the states you missed are saved to `states_to_learn.csv`. + +![The blank map with the prompt at 0/50 states](https://git.tirsystem.com/Tirsvad-Udemy-100-days-of-code/025-us-states-game/raw/branch/main/docs/images/game-start.png) + +![A game in progress: 14 of 50 states named](https://git.tirsystem.com/Tirsvad-Udemy-100-days-of-code/025-us-states-game/raw/branch/main/docs/images/game-in-progress.png) + +## At a glance + +- Python 3.13 or newer, no runtime dependencies +- Tests with `pytest`, no display needed +- Source documentation with Doxygen +- Wiki in English, Danish and Bahasa Malaysia + +## Pages + +| Page | | +| --- | --- | +| [Install](Install) | Set the project up on Windows, Linux Debian or MacOS and run it | +| [Description](Description) | How the game and the code work: rules, modules, tests, CI and source documentation | + +[Repository](https://git.tirsystem.com/Tirsvad-Udemy-100-days-of-code/025-us-states-game) diff --git a/wiki/Home.ms.md b/wiki/Home.ms.md new file mode 100644 index 0000000..45f476f --- /dev/null +++ b/wiki/Home.ms.md @@ -0,0 +1,25 @@ +[English](Home) | [Dansk](Home.da) | **Bahasa Melayu** + +# U.S. States Game + +Permainan kuiz daripada *100 Days of Code* Udemy (hari 25): namakan 50 negeri di peta kosong Amerika Syarikat. Setiap jawapan yang betul dipaparkan pada peta; apabila anda berhenti, negeri yang terlepas disimpan dalam `states_to_learn.csv`. + +![Peta kosong dengan gesaan pada 0/50 negeri](https://git.tirsystem.com/Tirsvad-Udemy-100-days-of-code/025-us-states-game/raw/branch/main/docs/images/game-start.png) + +![Permainan sedang berjalan: 14 daripada 50 negeri dinamakan](https://git.tirsystem.com/Tirsvad-Udemy-100-days-of-code/025-us-states-game/raw/branch/main/docs/images/game-in-progress.png) + +## Ringkasnya + +- Python 3.13 atau lebih baharu, tiada kebergantungan masa jalan +- Ujian dengan `pytest`, tiada paparan diperlukan +- Dokumentasi sumber dengan Doxygen +- Wiki dalam bahasa Inggeris, Denmark dan Bahasa Melayu + +## Halaman + +| Page | | +| --- | --- | +| [Pemasangan](Install.ms) | Sediakan projek pada Windows, Linux Debian atau MacOS dan jalankannya | +| [Penerangan](Description.ms) | Cara permainan dan kod berfungsi: peraturan, modul, ujian, CI dan dokumentasi sumber | + +[Repositori](https://git.tirsystem.com/Tirsvad-Udemy-100-days-of-code/025-us-states-game) diff --git a/wiki/Install.da.md b/wiki/Install.da.md new file mode 100644 index 0000000..d8915f6 --- /dev/null +++ b/wiki/Install.da.md @@ -0,0 +1,63 @@ +[English](Install) | **Dansk** | [Bahasa Melayu](Install.ms) + +# Installation + +Opret et lokalt virtuelt miljø med navnet `.venv`, opgradér `pip` og installér projektet med testværktøjet. + +## Krav + +- Python 3.13 eller nyere, med `tkinter` (Turtle kræver det) +- `git` +- Valgfrit: Doxygen til at bygge kildedokumentationen + +## Windows PowerShell + +```powershell +git clone https://git.tirsystem.com/Tirsvad-Udemy-100-days-of-code/025-us-states-game.git +cd 025-us-states-game +python -m venv .venv +.\.venv\Scripts\Activate.ps1 +python -m pip install --upgrade pip +python -m pip install -e ".[dev]" +``` + +## Linux Debian + +```bash +sudo apt install python3 python3-venv python3-tk git +git clone https://git.tirsystem.com/Tirsvad-Udemy-100-days-of-code/025-us-states-game.git +cd 025-us-states-game +python3 -m venv .venv +source .venv/bin/activate +python -m pip install --upgrade pip +python -m pip install -e ".[dev]" +``` + +## MacOS + +```bash +git clone https://git.tirsystem.com/Tirsvad-Udemy-100-days-of-code/025-us-states-game.git +cd 025-us-states-game +python3 -m venv .venv +source .venv/bin/activate +python -m pip install --upgrade pip +python -m pip install -e ".[dev]" +``` + +## Kør + +```bash +python -m us_states_game +``` + +Skriv et delstatsnavn i prompten; store og små bogstaver er ligegyldige. Skriv `exit` (eller tryk Annuller) for at stoppe. De delstater, du ikke navngav, skrives til `states_to_learn.csv` i den aktuelle mappe. Tilføj `--show-coordinates` for at udskrive koordinaterne for museklik. + +![Et spil i gang: 14 af 50 delstater navngivet](https://git.tirsystem.com/Tirsvad-Udemy-100-days-of-code/025-us-states-game/raw/branch/main/docs/images/game-in-progress.png) + +## Kør testene + +```bash +python -m pytest +``` + +Testene kræver ingen skærm. diff --git a/wiki/Install.md b/wiki/Install.md new file mode 100644 index 0000000..7d8f863 --- /dev/null +++ b/wiki/Install.md @@ -0,0 +1,63 @@ +**English** | [Dansk](Install.da) | [Bahasa Melayu](Install.ms) + +# Install + +Create a local virtual environment named `.venv`, upgrade `pip` and install the project with its test tool. + +## Requirements + +- Python 3.13 or newer, with `tkinter` (Turtle needs it) +- `git` +- Optional: Doxygen to build the source documentation + +## Windows PowerShell + +```powershell +git clone https://git.tirsystem.com/Tirsvad-Udemy-100-days-of-code/025-us-states-game.git +cd 025-us-states-game +python -m venv .venv +.\.venv\Scripts\Activate.ps1 +python -m pip install --upgrade pip +python -m pip install -e ".[dev]" +``` + +## Linux Debian + +```bash +sudo apt install python3 python3-venv python3-tk git +git clone https://git.tirsystem.com/Tirsvad-Udemy-100-days-of-code/025-us-states-game.git +cd 025-us-states-game +python3 -m venv .venv +source .venv/bin/activate +python -m pip install --upgrade pip +python -m pip install -e ".[dev]" +``` + +## MacOS + +```bash +git clone https://git.tirsystem.com/Tirsvad-Udemy-100-days-of-code/025-us-states-game.git +cd 025-us-states-game +python3 -m venv .venv +source .venv/bin/activate +python -m pip install --upgrade pip +python -m pip install -e ".[dev]" +``` + +## Run + +```bash +python -m us_states_game +``` + +Type a state name in the prompt; case does not matter. Type `exit` (or press Cancel) to quit. The states you did not name are written to `states_to_learn.csv` in the current folder. Add `--show-coordinates` to print the coordinates of mouse clicks. + +![A game in progress: 14 of 50 states named](https://git.tirsystem.com/Tirsvad-Udemy-100-days-of-code/025-us-states-game/raw/branch/main/docs/images/game-in-progress.png) + +## Run the tests + +```bash +python -m pytest +``` + +The tests need no display. diff --git a/wiki/Install.ms.md b/wiki/Install.ms.md new file mode 100644 index 0000000..c5fc669 --- /dev/null +++ b/wiki/Install.ms.md @@ -0,0 +1,63 @@ +[English](Install) | [Dansk](Install.da) | **Bahasa Melayu** + +# Pemasangan + +Cipta persekitaran maya tempatan bernama `.venv`, naik taraf `pip` dan pasang projek dengan alat ujiannya. + +## Keperluan + +- Python 3.13 atau lebih baharu, dengan `tkinter` (Turtle memerlukannya) +- `git` +- Pilihan: Doxygen untuk membina dokumentasi sumber + +## Windows PowerShell + +```powershell +git clone https://git.tirsystem.com/Tirsvad-Udemy-100-days-of-code/025-us-states-game.git +cd 025-us-states-game +python -m venv .venv +.\.venv\Scripts\Activate.ps1 +python -m pip install --upgrade pip +python -m pip install -e ".[dev]" +``` + +## Linux Debian + +```bash +sudo apt install python3 python3-venv python3-tk git +git clone https://git.tirsystem.com/Tirsvad-Udemy-100-days-of-code/025-us-states-game.git +cd 025-us-states-game +python3 -m venv .venv +source .venv/bin/activate +python -m pip install --upgrade pip +python -m pip install -e ".[dev]" +``` + +## MacOS + +```bash +git clone https://git.tirsystem.com/Tirsvad-Udemy-100-days-of-code/025-us-states-game.git +cd 025-us-states-game +python3 -m venv .venv +source .venv/bin/activate +python -m pip install --upgrade pip +python -m pip install -e ".[dev]" +``` + +## Jalankan + +```bash +python -m us_states_game +``` + +Taip nama negeri pada gesaan; huruf besar atau kecil tidak penting. Taip `exit` (atau tekan Cancel) untuk berhenti. Negeri yang tidak anda namakan ditulis ke `states_to_learn.csv` dalam folder semasa. Tambah `--show-coordinates` untuk mencetak koordinat klik tetikus. + +![Permainan sedang berjalan: 14 daripada 50 negeri dinamakan](https://git.tirsystem.com/Tirsvad-Udemy-100-days-of-code/025-us-states-game/raw/branch/main/docs/images/game-in-progress.png) + +## Jalankan ujian + +```bash +python -m pytest +``` + +Ujian tidak memerlukan paparan. diff --git a/wiki/_Sidebar.md b/wiki/_Sidebar.md new file mode 100644 index 0000000..08fe86e --- /dev/null +++ b/wiki/_Sidebar.md @@ -0,0 +1,19 @@ +**U.S. States Game** + +**English** + +- [Home](Home) +- [Install](Install) +- [Description](Description) + +**Dansk** + +- [Hjem](Home.da) +- [Installation](Install.da) +- [Beskrivelse](Description.da) + +**Bahasa Melayu** + +- [Utama](Home.ms) +- [Pemasangan](Install.ms) +- [Penerangan](Description.ms)