MIL-006: Screenshot #45

Merged
Tirsvad merged 5 commits from mil-006-screenshot into main 2026-10-13 09:03:38 +02:00
3 changed files with 12 additions and 0 deletions
Showing only changes of commit a13350d68a - Show all commits
+4
View File
@@ -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 |
+4
View File
@@ -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 |
+4
View File
@@ -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 |