From c5565229d8bc9d267304a87bd139ff2d6056e067 Mon Sep 17 00:00:00 2001 From: Jens Tirsvad Nielsen Date: Tue, 13 Oct 2026 14:02:01 +0800 Subject: [PATCH] Finish the README and add the wiki in English, Danish and Bahasa Malaysia Doxygen builds the source documentation without warnings. Task: MIL-007#1 Task: MIL-007#2 Task: MIL-007#3 --- README.md | 242 +++++++++++++++++++++------------------- wiki/Architecture-da.md | 33 ++++++ wiki/Architecture-ms.md | 33 ++++++ wiki/Architecture.md | 33 ++++++ wiki/Home-da.md | 28 +++++ wiki/Home-ms.md | 29 +++++ wiki/Home.md | 28 +++++ wiki/Install-da.md | 53 +++++++++ wiki/Install-ms.md | 53 +++++++++ wiki/Install.md | 53 +++++++++ wiki/Play-da.md | 26 +++++ wiki/Play-ms.md | 26 +++++ wiki/Play.md | 25 +++++ wiki/_Sidebar.md | 20 ++++ 14 files changed, 565 insertions(+), 117 deletions(-) create mode 100644 wiki/Architecture-da.md create mode 100644 wiki/Architecture-ms.md create mode 100644 wiki/Architecture.md create mode 100644 wiki/Home-da.md create mode 100644 wiki/Home-ms.md create mode 100644 wiki/Home.md create mode 100644 wiki/Install-da.md create mode 100644 wiki/Install-ms.md create mode 100644 wiki/Install.md create mode 100644 wiki/Play-da.md create mode 100644 wiki/Play-ms.md create mode 100644 wiki/Play.md create mode 100644 wiki/_Sidebar.md diff --git a/README.md b/README.md index 975d554..f59d120 100644 --- a/README.md +++ b/README.md @@ -1,117 +1,125 @@ -# Turtle Crossing - -A Turtle Crossing game, the Day 23 capstone of Udemy's *100 Days of Code: The -Complete Python Pro Bootcamp*. Steer the turtle north across a busy road of -randomly generated cars. Each crossing raises the level and the car speed; one -collision ends the game. Written with the Python standard library only. - -## Requirements - -- Python 3.13 or newer, with `tkinter` (the `turtle` module needs it). -- `git` to clone the repository. -- `pytest` for the tests (development only; the game has no runtime dependencies). -- Optional: [Doxygen](https://www.doxygen.nl/) to build the source documentation. - -## Set up - -Clone the repository and create a local virtual environment named `.venv` in -the project folder. Upgrade `pip` first, then install the development -dependencies from `pyproject.toml`. - -### Windows powershell - -```powershell -git clone https://git.tirsystem.com/Tirsvad-Udemy-100-days-of-code/023-turtle-crossing.git -cd 023-turtle-crossing -py -3.13 -m venv .venv -.\.venv\Scripts\Activate.ps1 -python -m pip install --upgrade pip -python -m pip install --group dev -``` - -If PowerShell refuses to run the activation script, allow it for this session -with `Set-ExecutionPolicy -Scope Process -ExecutionPolicy RemoteSigned`. - -### Linux debian - -```bash -sudo apt update && sudo apt install -y git python3.13 python3.13-venv python3-tk -git clone https://git.tirsystem.com/Tirsvad-Udemy-100-days-of-code/023-turtle-crossing.git -cd 023-turtle-crossing -python3.13 -m venv .venv -source .venv/bin/activate -python -m pip install --upgrade pip -python -m pip install --group dev -``` - -If `python3.13` is not in your distribution, install Python 3.13 with your -preferred tool (for example `pyenv`) and run the same `venv` command with it. - -### MacOS - -```bash -brew install python@3.13 python-tk@3.13 git -git clone https://git.tirsystem.com/Tirsvad-Udemy-100-days-of-code/023-turtle-crossing.git -cd 023-turtle-crossing -python3.13 -m venv .venv -source .venv/bin/activate -python -m pip install --upgrade pip -python -m pip install --group dev -``` - -## Run - -Activate the `.venv`, then start the game from the project root: - -```bash -python src/main.py -``` - -Press the **Up** arrow key to move the turtle forward. Reaching the top edge -returns the turtle to the start and speeds up the cars. A collision shows -`GAME OVER`; click the window to close it. - -## Run the tests - -With the `.venv` active: - -```bash -python -m pytest -``` - -Tests that need a window are skipped automatically when no display is -available. On a headless Linux machine run `xvfb-run python -m pytest`. - -## Continuous integration - -`.gitea/workflows/ci.yml` runs on every push to `main` and on every pull -request. It sets up Python 3.13, upgrades `pip`, installs the development -dependencies and runs `pytest` under a virtual display. - -## Build the source documentation - -The source uses Doxygen comments and the `Doxyfile` in the project root. - -```bash -doxygen Doxyfile -``` - -Open `docs/api/html/index.html` in a browser. - -## Project layout - -```text -. -├── src/ game source: main.py, constants.py, player.py, car_manager.py, scoreboard.py -├── tests/ pytest tests -├── docs/ planning and review documents (business case, plan, milestones, reviews) -├── Doxyfile Doxygen configuration -├── pyproject.toml project configuration and development dependencies -└── .gitea/ continuous integration workflow -``` - -All constants live in `src/constants.py`. - -## License - -GNU Affero General Public License v3.0, see [LICENSE](LICENSE). +# Turtle Crossing + +A Turtle Crossing game, the Day 23 capstone of Udemy's *100 Days of Code: The +Complete Python Pro Bootcamp*. Steer the turtle north across a busy road of +randomly generated cars. Each crossing raises the level and the car speed; one +collision ends the game. Written with the Python standard library only. + +## Requirements + +- Python 3.13 or newer, with `tkinter` (the `turtle` module needs it). +- `git` to clone the repository. +- `pytest` for the tests (development only; the game has no runtime dependencies). +- Optional: [Doxygen](https://www.doxygen.nl/) to build the source documentation. + +## Set up + +Clone the repository and create a local virtual environment named `.venv` in +the project folder. Upgrade `pip` first, then install the development +dependencies from `pyproject.toml`. + +### Windows powershell + +```powershell +git clone https://git.tirsystem.com/Tirsvad-Udemy-100-days-of-code/023-turtle-crossing.git +cd 023-turtle-crossing +py -3.13 -m venv .venv +.\.venv\Scripts\Activate.ps1 +python -m pip install --upgrade pip +python -m pip install --group dev +``` + +If PowerShell refuses to run the activation script, allow it for this session +with `Set-ExecutionPolicy -Scope Process -ExecutionPolicy RemoteSigned`. + +### Linux debian + +```bash +sudo apt update && sudo apt install -y git python3.13 python3.13-venv python3-tk +git clone https://git.tirsystem.com/Tirsvad-Udemy-100-days-of-code/023-turtle-crossing.git +cd 023-turtle-crossing +python3.13 -m venv .venv +source .venv/bin/activate +python -m pip install --upgrade pip +python -m pip install --group dev +``` + +If `python3.13` is not in your distribution, install Python 3.13 with your +preferred tool (for example `pyenv`) and run the same `venv` command with it. + +### MacOS + +```bash +brew install python@3.13 python-tk@3.13 git +git clone https://git.tirsystem.com/Tirsvad-Udemy-100-days-of-code/023-turtle-crossing.git +cd 023-turtle-crossing +python3.13 -m venv .venv +source .venv/bin/activate +python -m pip install --upgrade pip +python -m pip install --group dev +``` + +## Run + +Activate the `.venv`, then start the game from the project root: + +```bash +python src/main.py +``` + +Press the **Up** arrow key to move the turtle forward. Reaching the top edge +returns the turtle to the start and speeds up the cars. A collision shows +`GAME OVER`; click the window to close it. + +## Run the tests + +With the `.venv` active: + +```bash +python -m pytest +``` + +Tests that need a window are skipped automatically when no display is +available. On a headless Linux machine run `xvfb-run python -m pytest`. + +## Continuous integration + +`.gitea/workflows/ci.yml` runs on every push to `main` and on every pull +request. It sets up Python 3.13, upgrades `pip`, installs the development +dependencies and runs `pytest` under a virtual display. + +## Build the source documentation + +The source uses Doxygen comments and the `Doxyfile` in the project root. + +```bash +doxygen Doxyfile +``` + +Open `docs/api/html/index.html` in a browser. + +## Project layout + +```text +. +├── src/ game source +│ ├── main.py screen, objects and the game loop +│ ├── constants.py every constant +│ ├── player.py Player +│ ├── car_manager.py CarManager +│ ├── car_shape.py how a car is drawn +│ ├── collision.py collision test +│ └── scoreboard.py Scoreboard +├── tests/ pytest tests +├── docs/ planning and review documents (business case, plan, milestones, reviews) +├── wiki/ wiki pages in English, Danish (-da) and Bahasa Malaysia (-ms) +├── Doxyfile Doxygen configuration +├── pyproject.toml project configuration and development dependencies +└── .gitea/ continuous integration workflow +``` + +All constants live in `src/constants.py`. + +## License + +GNU Affero General Public License v3.0, see [LICENSE](LICENSE). diff --git a/wiki/Architecture-da.md b/wiki/Architecture-da.md new file mode 100644 index 0000000..af71755 --- /dev/null +++ b/wiki/Architecture-da.md @@ -0,0 +1,33 @@ +# Arkitektur + +🌐 [English](Architecture) · **Dansk** · [Bahasa Malaysia](Architecture-ms) + +## Moduler (`src/`) + +| Modul | Ansvar | +| --- | --- | +| `main.py` | Opretter skærmen og objekterne og kører spilløkken | +| `constants.py` | Alle konstanter, defineret ét sted | +| `player.py` | `Player(Turtle)`: `go_up`, `is_at_finish_line`, `go_to_start` | +| `car_manager.py` | `CarManager`: `create_cars`, `move_cars`, `is_hit`, `level_up` | +| `car_shape.py` | Tegningen af en bil: karrosseri, kabine, ruder, forlygte, to hjul | +| `collision.py` | `is_colliding`: ren rektangeltest, uden turtle | +| `scoreboard.py` | `Scoreboard(Turtle)`: niveautekst og `GAME OVER` | + +## Designvalg + +- **Biler ligner biler.** En bil er en sammensat turtle-form inden for opgavens + fodaftryk på 40 x 20 pixel. Der registreres én form pr. farve, så der ikke + skal bruges billedfiler. +- **Kan testes uden vindue.** Geometrien (`car_components`), kollisionstesten og + reglen for oprettelse er almindelig kode. `CarManager` får en bilfabrik og en + tilfældighedskilde, så testene bruger en falsk bil og en fastlagt terning. +- **Kollision bruger hele bilen.** Spilleren sammenlignes med bilens rektangel, + ikke kun dens midte. + +## Dokumentation + +Kommentarerne i kilden er Doxygen-kommentarer. Byg dem med `doxygen Doxyfile`. +Plan- og reviewdokumenter ligger i `docs/`. + +Tilbage til [Forside](Home-da). diff --git a/wiki/Architecture-ms.md b/wiki/Architecture-ms.md new file mode 100644 index 0000000..62e5d61 --- /dev/null +++ b/wiki/Architecture-ms.md @@ -0,0 +1,33 @@ +# Seni bina + +🌐 [English](Architecture) · [Dansk](Architecture-da) · **Bahasa Malaysia** + +## Modul (`src/`) + +| Modul | Tanggungjawab | +| --- | --- | +| `main.py` | Mencipta skrin dan objek serta menjalankan gelung permainan | +| `constants.py` | Semua pemalar, ditakrifkan sekali sahaja | +| `player.py` | `Player(Turtle)`: `go_up`, `is_at_finish_line`, `go_to_start` | +| `car_manager.py` | `CarManager`: `create_cars`, `move_cars`, `is_hit`, `level_up` | +| `car_shape.py` | Lukisan sebuah kereta: badan, kabin, tingkap, lampu depan, dua roda | +| `collision.py` | `is_colliding`: ujian segi empat tepat tulen, tanpa turtle | +| `scoreboard.py` | `Scoreboard(Turtle)`: teks tahap dan `GAME OVER` | + +## Pilihan reka bentuk + +- **Kereta kelihatan seperti kereta.** Sebuah kereta ialah bentuk turtle + gabungan dalam tapak 40 x 20 piksel yang ditetapkan tugasan. Satu bentuk + didaftarkan bagi setiap warna, jadi tiada fail imej diperlukan. +- **Boleh diuji tanpa tetingkap.** Geometri (`car_components`), ujian perlanggaran + dan peraturan penciptaan ialah kod biasa. `CarManager` menerima kilang kereta + dan sumber rawak, jadi ujian menggunakan kereta palsu dan dadu yang ditetapkan. +- **Perlanggaran menggunakan seluruh kereta.** Pemain dibandingkan dengan segi + empat tepat kereta, bukan hanya bahagian tengahnya. + +## Dokumentasi + +Komen dalam sumber ialah komen Doxygen. Bina dengan `doxygen Doxyfile`. +Dokumen perancangan dan semakan terdapat dalam `docs/`. + +Kembali ke [Laman utama](Home-ms). diff --git a/wiki/Architecture.md b/wiki/Architecture.md new file mode 100644 index 0000000..884cf51 --- /dev/null +++ b/wiki/Architecture.md @@ -0,0 +1,33 @@ +# Architecture + +🌐 **English** · [Dansk](Architecture-da) · [Bahasa Malaysia](Architecture-ms) + +## Modules (`src/`) + +| Module | Responsibility | +| --- | --- | +| `main.py` | Creates the screen, the objects and runs the game loop | +| `constants.py` | Every constant, defined once | +| `player.py` | `Player(Turtle)`: `go_up`, `is_at_finish_line`, `go_to_start` | +| `car_manager.py` | `CarManager`: `create_cars`, `move_cars`, `is_hit`, `level_up` | +| `car_shape.py` | The drawing of a car: body, cabin, windows, headlight, two wheels | +| `collision.py` | `is_colliding`: pure rectangle test, no turtle needed | +| `scoreboard.py` | `Scoreboard(Turtle)`: level text and `GAME OVER` | + +## Design choices + +- **Cars look like cars.** A car is a compound turtle shape inside the 40 x 20 + pixel footprint of the assignment. One shape is registered per colour, so no + image files are needed. +- **Testable without a window.** Geometry (`car_components`), the collision + test and the spawn rule are plain code. `CarManager` receives a car factory + and a random source, so tests use a fake car and a seeded dice. +- **Collision uses the whole car.** The player is compared with the car's + rectangle, not only with its centre. + +## Documentation + +Source comments are Doxygen comments. Build them with `doxygen Doxyfile`. +Planning and review documents are in `docs/`. + +Back to [Home](Home). diff --git a/wiki/Home-da.md b/wiki/Home-da.md new file mode 100644 index 0000000..e3f8510 --- /dev/null +++ b/wiki/Home-da.md @@ -0,0 +1,28 @@ +# Turtle Crossing + +🌐 [English](Home) · **Dansk** · [Bahasa Malaysia](Home-ms) + +Dag 23 i Udemys *100 Days of Code: The Complete Python Pro Bootcamp*: et spil i +Crossy Road-stil. Styr en skildpadde mod nord over en travl vej. Hver +krydsning gør bilerne hurtigere; ét sammenstød afslutter spillet. + +| Side | Læs den, når du vil | +| --- | --- | +| [Installation](Install-da) | Klone repositoryet, oprette `.venv` og køre spillet og testene | +| [Spil](Play-da) | Lære reglerne og styringen | +| [Arkitektur](Architecture-da) | Se hvordan koden er delt i moduler, og hvorfor | + +## Overblik + +- Python 3.13 eller nyere, kun standardbiblioteket ved kørsel. +- Klasserne bruger opgavens navne: `Player`, `CarManager`, `Scoreboard`. +- Alle konstanter ligger i `src/constants.py`. +- Testene køres med `pytest`; kildedokumentationen bygges med Doxygen. + +## Links + +- [Repository][repo] +- [README][readme] + +[repo]: https://git.tirsystem.com/Tirsvad-Udemy-100-days-of-code/023-turtle-crossing +[readme]: https://git.tirsystem.com/Tirsvad-Udemy-100-days-of-code/023-turtle-crossing/src/branch/main/README.md diff --git a/wiki/Home-ms.md b/wiki/Home-ms.md new file mode 100644 index 0000000..bc8b574 --- /dev/null +++ b/wiki/Home-ms.md @@ -0,0 +1,29 @@ +# Turtle Crossing + +🌐 [English](Home) · [Dansk](Home-da) · **Bahasa Malaysia** + +Hari ke-23 dalam *100 Days of Code: The Complete Python Pro Bootcamp* Udemy: +permainan gaya Crossy Road. Pandu seekor penyu ke utara merentasi jalan yang +sibuk. Setiap kali berjaya melintas, kereta menjadi lebih laju; satu perlanggaran +menamatkan permainan. + +| Halaman | Baca apabila anda mahu | +| --- | --- | +| [Pemasangan](Install-ms) | Klon repositori, cipta `.venv` dan jalankan permainan serta ujian | +| [Main](Play-ms) | Mempelajari peraturan dan kawalan | +| [Seni bina](Architecture-ms) | Melihat bagaimana kod dibahagikan kepada modul dan sebabnya | + +## Ringkasan + +- Python 3.13 atau lebih baharu, hanya pustaka standard semasa dijalankan. +- Kelas menggunakan nama tugasan: `Player`, `CarManager`, `Scoreboard`. +- Semua pemalar berada dalam `src/constants.py`. +- Ujian dijalankan dengan `pytest`; dokumentasi sumber dibina dengan Doxygen. + +## Pautan + +- [Repositori][repo] +- [README][readme] + +[repo]: https://git.tirsystem.com/Tirsvad-Udemy-100-days-of-code/023-turtle-crossing +[readme]: https://git.tirsystem.com/Tirsvad-Udemy-100-days-of-code/023-turtle-crossing/src/branch/main/README.md diff --git a/wiki/Home.md b/wiki/Home.md new file mode 100644 index 0000000..fcb3879 --- /dev/null +++ b/wiki/Home.md @@ -0,0 +1,28 @@ +# Turtle Crossing + +🌐 **English** · [Dansk](Home-da) · [Bahasa Malaysia](Home-ms) + +Day 23 of Udemy's *100 Days of Code: The Complete Python Pro Bootcamp*: a +Crossy Road style game. Steer a turtle north across a busy road. Every +crossing makes the cars faster; one collision ends the game. + +| Page | Read it when you want to | +| --- | --- | +| [Install](Install) | Clone the repository, create the `.venv` and run the game and the tests | +| [Play](Play) | Learn the rules and the controls | +| [Architecture](Architecture) | See how the code is split into modules and why | + +## At a glance + +- Python 3.13 or newer, standard library only at runtime. +- Classes use the assignment's names: `Player`, `CarManager`, `Scoreboard`. +- All constants live in `src/constants.py`. +- Tests run with `pytest`; source documentation is built with Doxygen. + +## Links + +- [Repository][repo] +- [README][readme] + +[repo]: https://git.tirsystem.com/Tirsvad-Udemy-100-days-of-code/023-turtle-crossing +[readme]: https://git.tirsystem.com/Tirsvad-Udemy-100-days-of-code/023-turtle-crossing/src/branch/main/README.md diff --git a/wiki/Install-da.md b/wiki/Install-da.md new file mode 100644 index 0000000..bae67bb --- /dev/null +++ b/wiki/Install-da.md @@ -0,0 +1,53 @@ +# Installation + +🌐 [English](Install) · **Dansk** · [Bahasa Malaysia](Install-ms) + +## Krav + +- Python 3.13 eller nyere med `tkinter`. +- `git`. +- Valgfrit: Doxygen til kildedokumentationen. + +## Windows PowerShell + +```powershell +git clone https://git.tirsystem.com/Tirsvad-Udemy-100-days-of-code/023-turtle-crossing.git +cd 023-turtle-crossing +py -3.13 -m venv .venv +.\.venv\Scripts\Activate.ps1 +python -m pip install --upgrade pip +python -m pip install --group dev +``` + +## Linux Debian + +```bash +sudo apt update && sudo apt install -y git python3.13 python3.13-venv python3-tk +git clone https://git.tirsystem.com/Tirsvad-Udemy-100-days-of-code/023-turtle-crossing.git +cd 023-turtle-crossing +python3.13 -m venv .venv +source .venv/bin/activate +python -m pip install --upgrade pip +python -m pip install --group dev +``` + +## macOS + +```bash +brew install python@3.13 python-tk@3.13 git +git clone https://git.tirsystem.com/Tirsvad-Udemy-100-days-of-code/023-turtle-crossing.git +cd 023-turtle-crossing +python3.13 -m venv .venv +source .venv/bin/activate +python -m pip install --upgrade pip +python -m pip install --group dev +``` + +## Kør og test + +```bash +python src/main.py +python -m pytest +``` + +Næste: [Spil](Play-da). diff --git a/wiki/Install-ms.md b/wiki/Install-ms.md new file mode 100644 index 0000000..500bcfd --- /dev/null +++ b/wiki/Install-ms.md @@ -0,0 +1,53 @@ +# Pemasangan + +🌐 [English](Install) · [Dansk](Install-da) · **Bahasa Malaysia** + +## Keperluan + +- Python 3.13 atau lebih baharu dengan `tkinter`. +- `git`. +- Pilihan: Doxygen untuk dokumentasi sumber. + +## Windows PowerShell + +```powershell +git clone https://git.tirsystem.com/Tirsvad-Udemy-100-days-of-code/023-turtle-crossing.git +cd 023-turtle-crossing +py -3.13 -m venv .venv +.\.venv\Scripts\Activate.ps1 +python -m pip install --upgrade pip +python -m pip install --group dev +``` + +## Linux Debian + +```bash +sudo apt update && sudo apt install -y git python3.13 python3.13-venv python3-tk +git clone https://git.tirsystem.com/Tirsvad-Udemy-100-days-of-code/023-turtle-crossing.git +cd 023-turtle-crossing +python3.13 -m venv .venv +source .venv/bin/activate +python -m pip install --upgrade pip +python -m pip install --group dev +``` + +## macOS + +```bash +brew install python@3.13 python-tk@3.13 git +git clone https://git.tirsystem.com/Tirsvad-Udemy-100-days-of-code/023-turtle-crossing.git +cd 023-turtle-crossing +python3.13 -m venv .venv +source .venv/bin/activate +python -m pip install --upgrade pip +python -m pip install --group dev +``` + +## Jalankan dan uji + +```bash +python src/main.py +python -m pytest +``` + +Seterusnya: [Main](Play-ms). diff --git a/wiki/Install.md b/wiki/Install.md new file mode 100644 index 0000000..50908f7 --- /dev/null +++ b/wiki/Install.md @@ -0,0 +1,53 @@ +# Install + +🌐 **English** · [Dansk](Install-da) · [Bahasa Malaysia](Install-ms) + +## Requirements + +- Python 3.13 or newer with `tkinter`. +- `git`. +- Optional: Doxygen for the source documentation. + +## Windows PowerShell + +```powershell +git clone https://git.tirsystem.com/Tirsvad-Udemy-100-days-of-code/023-turtle-crossing.git +cd 023-turtle-crossing +py -3.13 -m venv .venv +.\.venv\Scripts\Activate.ps1 +python -m pip install --upgrade pip +python -m pip install --group dev +``` + +## Linux Debian + +```bash +sudo apt update && sudo apt install -y git python3.13 python3.13-venv python3-tk +git clone https://git.tirsystem.com/Tirsvad-Udemy-100-days-of-code/023-turtle-crossing.git +cd 023-turtle-crossing +python3.13 -m venv .venv +source .venv/bin/activate +python -m pip install --upgrade pip +python -m pip install --group dev +``` + +## macOS + +```bash +brew install python@3.13 python-tk@3.13 git +git clone https://git.tirsystem.com/Tirsvad-Udemy-100-days-of-code/023-turtle-crossing.git +cd 023-turtle-crossing +python3.13 -m venv .venv +source .venv/bin/activate +python -m pip install --upgrade pip +python -m pip install --group dev +``` + +## Run and test + +```bash +python src/main.py +python -m pytest +``` + +Next: [Play](Play). diff --git a/wiki/Play-da.md b/wiki/Play-da.md new file mode 100644 index 0000000..f3a95fc --- /dev/null +++ b/wiki/Play-da.md @@ -0,0 +1,26 @@ +# Spil + +🌐 [English](Play) · **Dansk** · [Bahasa Malaysia](Play-ms) + +## Styring + +| Tast | Handling | +| --- | --- | +| Pil op | Flyt skildpadden ét skridt mod nord. Skildpadden kan ikke gå tilbage, til venstre eller til højre. | + +## Regler + +1. Biler dukker op i højre kant i tilfældige baner og kører mod venstre. De + øverste og nederste 50 pixel er en sikker zone uden biler. +2. Nå den øverste kant for at komme over. Skildpadden vender tilbage til + start, niveauet stiger med én, og bilerne bliver hurtigere. +3. Berører du en bil, er spillet slut. `GAME OVER` vises i midten; klik på + vinduet for at lukke det. + +## Tips + +- Vent på et hul: en ny bil oprettes cirka hver sjette billedramme. +- Hvert niveau lægger det samme hastighedstrin til, så senere niveauer kræver + hurtige, korte træk. + +Tilbage til [Forside](Home-da). diff --git a/wiki/Play-ms.md b/wiki/Play-ms.md new file mode 100644 index 0000000..fe84830 --- /dev/null +++ b/wiki/Play-ms.md @@ -0,0 +1,26 @@ +# Main + +🌐 [English](Play) · [Dansk](Play-da) · **Bahasa Malaysia** + +## Kawalan + +| Kekunci | Tindakan | +| --- | --- | +| Anak panah atas | Gerakkan penyu satu langkah ke utara. Penyu tidak boleh bergerak ke belakang, kiri atau kanan. | + +## Peraturan + +1. Kereta muncul di tepi kanan dalam lorong rawak dan bergerak ke kiri. 50 + piksel teratas dan terbawah ialah zon selamat tanpa kereta. +2. Sampai ke tepi atas untuk melintas. Penyu kembali ke permulaan, tahap naik + satu dan kereta menjadi lebih laju. +3. Jika menyentuh kereta, permainan tamat. `GAME OVER` dipaparkan di tengah; + klik tetingkap untuk menutupnya. + +## Petua + +- Tunggu ruang kosong: kereta baharu dicipta kira-kira sekali dalam enam bingkai. +- Setiap tahap menambah langkah kelajuan yang sama, jadi tahap lebih tinggi + memerlukan gerakan pantas dan pendek. + +Kembali ke [Laman utama](Home-ms). diff --git a/wiki/Play.md b/wiki/Play.md new file mode 100644 index 0000000..ce9f53a --- /dev/null +++ b/wiki/Play.md @@ -0,0 +1,25 @@ +# Play + +🌐 **English** · [Dansk](Play-da) · [Bahasa Malaysia](Play-ms) + +## Controls + +| Key | Action | +| --- | --- | +| Up arrow | Move the turtle one step north. The turtle cannot move back, left or right. | + +## Rules + +1. Cars appear on the right edge in random lanes and drive left. The top and + bottom 50 pixels are a safe zone with no cars. +2. Reach the top edge to cross. The turtle returns to the start, the level goes + up by one and the cars become faster. +3. Touching a car ends the game. `GAME OVER` is shown in the centre; click the + window to close it. + +## Tips + +- Wait for a gap: a new car is created on about one frame in six. +- Every level adds the same speed step, so later levels need quick, short moves. + +Back to [Home](Home). diff --git a/wiki/_Sidebar.md b/wiki/_Sidebar.md new file mode 100644 index 0000000..0a39723 --- /dev/null +++ b/wiki/_Sidebar.md @@ -0,0 +1,20 @@ +**Turtle Crossing** + +- [Home](Home) +- [Install](Install) +- [Play](Play) +- [Architecture](Architecture) + +**Dansk** + +- [Forside](Home-da) +- [Installation](Install-da) +- [Spil](Play-da) +- [Arkitektur](Architecture-da) + +**Bahasa Malaysia** + +- [Laman utama](Home-ms) +- [Pemasangan](Install-ms) +- [Main](Play-ms) +- [Seni bina](Architecture-ms) -- 2.54.0