Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| lehrkraefte:blc:informatik:glf24:laby:labyrintklasse [2025/05/25 06:45] – [Aufgabe 1] Ivo Blöchliger | lehrkraefte:blc:informatik:glf24:laby:labyrintklasse [2025/06/05 08:31] (current) – [Aufgabe 1] Ivo Blöchliger | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Labyrinth Klasse ====== | ====== Labyrinth Klasse ====== | ||
| + | <WRAP important> | ||
| + | Falls Sie die Dateien '' | ||
| + | </ | ||
| * Speichern Sie die Labyrinth-Klasse {{lehrkraefte: | * Speichern Sie die Labyrinth-Klasse {{lehrkraefte: | ||
| Line 52: | Line 55: | ||
| </ | </ | ||
| * Hinweis: Das Programm könnte kompakt mit der Methode '' | * Hinweis: Das Programm könnte kompakt mit der Methode '' | ||
| - | * z.B. liefert '' | + | * z.B. liefert '' |
| * z.B. wird mit '' | * z.B. wird mit '' | ||
| - | < | + | < |
| <code python> | <code python> | ||
| - | a = [80, 114, 111, 98, 105, 101, 114, 101, 110, 32, 83, 105, 101, 32, 101, 115, 32, 100, 111, 99, 104, 32, 101, 114, 115, 116, 32, 109, 97, 108, 32, 115, 101, 108, 98, 101, 114, 46, 46, 46] | + | for xy in range(4): |
| - | print("" | + | lab[2,xy].zustand(1, True) # Nach unten öffnen |
| + | lab[xy,2].zustand(0, True) # Nach rechts öffnen | ||
| + | </ | ||
| + | |||
| + | <code python> | ||
| + | for richtung in range(4): | ||
| + | lab[2,2].zustand(richtung, True) | ||
| + | lab[2,2].nachbar(richtung).zustand(richtung, True) | ||
| </ | </ | ||
| </ | </ | ||