Skip to content
This repository was archived by the owner on Nov 7, 2026. It is now read-only.

Commit d213c8e

Browse files
Web 0.14.24: Animation in Lektion 13, While-Schleife wird For-Schleife (#253)
Schritt 2 „Zählen mit festem Plan“ zeigt animiert, wie Start, Bedingung und Schritt der While-Schleife in den Kopf der For-Schleife wandern (de/en/pt). Neuer Block ::: grafik datei.svg animiert mit „Noch einmal abspielen“. Claude-Session: https://claude.ai/code/session_01Ugz28YRCDqXzuFbHDaDG3dH Co-authored-by: Claude <noreply@anthropic.com>
1 parent ec232a4 commit d213c8e

29 files changed

Lines changed: 504 additions & 157 deletions

‎CHANGELOG.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ The format is loosely inspired by Keep a Changelog.
88

99
### Changed
1010

11+
- **Web 0.14.24, animation: while becomes for in lesson 13:** step 2 „Zählen mit festem Plan“ of the for loop lesson shows an animated structure chart: the while loop's start value (`int i = 1`), condition (`i <= 5`) and step (`i++`) light up one after another in their own colour and then move together into the head of the for loop, labelled Start, Bedingung, Schritt (en Init/Condition/Step, pt Início/Condição/Passo). It plays once when it scrolls into view; „Noch einmal abspielen“ replays it. With reduced motion only the end state is shown. New lesson block `::: grafik datei.svg animiert` (own SVG with CSS animation, no library).
1112
- **Web 0.14.23, compact nested branches:** a two-way branch keeps both columns the same width only when neither column contains another branch or switch. Before, each nesting level doubled the width, so the drinks machine in lesson 10 step 2 (three nested branches) was about 3000 px wide and unreadable in the lesson and in the editor; now it is about half as wide, and 20 other lesson diagrams (e.g. VisuBot solutions, L17 ticket) get narrower too. Columns of a branch or switch inside a loop or another branch now always fill the box; before, the header could stay wider than its columns, so the if in lesson 14 step 3 looked like a loop (37 lesson diagrams affected). Wide diagrams in the lesson text no longer shrink below 60 % of their size; they scroll sideways instead.
1213
- **Web 0.14.22, text case names in quotation marks:** in lesson 10 the traffic light structure chart now uses the case names `"rot"`, `"gelb"`, `"grün"` (en `"red"` …, pt `"vermelho"` …) and the calculator solution `"+"`, `"-"`, `"*"`, so it is clear they are texts and the generated Java (`case "rot" ->`) is valid. Lesson text, hint and quiz say so (de/en/pt). The simulation still accepts case names without quotes.
1314
- **Web 0.14.21, array output like in Java:** `System.out.println(zahlen)` now prints a reference such as `[I@1e3779b1` in Simulation and Programmieren, as real Java does (`[D@`, `[Z@`, `[Ljava.lang.String;@`, `[[I@`; the same array keeps its id). `Arrays.toString(…)` and `Arrays.deepToString(…)` show the content; `Arrays` needs `import java.util.Arrays;` like javac, and the Java export adds it. The variable table still shows the content. Lesson 15 „Jetzt in Java“ explains reference and `Arrays.toString` (de/en/pt).
Lines changed: 44 additions & 0 deletions
Loading
Lines changed: 44 additions & 0 deletions
Loading
Lines changed: 44 additions & 0 deletions
Loading

‎web/lessons/de/13-for-schleife.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ kurz: Mit Start, Bedingung und Schritt eine feste Anzahl von Durchläufen zähle
1717

1818
In der While-Schleife hast du schon mitgezählt: Startwert vor der Schleife, Bedingung im Kopf, Veränderung im Inhalt. Die **For-Schleife** schreibt diese drei Teile zusammen in den Kopf. So siehst du auf einen Blick, wie gezählt wird.
1919

20+
::: grafik l12-while-zu-for.svg animiert
21+
Aus der While-Schleife wird eine For-Schleife: Start, Bedingung und Schritt wandern zusammen in den Kopf.
22+
:::
23+
2024
Wenn du eine For-Schleife anklickst, hat sie rechts drei Felder:
2125

2226
- **Start:** `int i = 1` legt die Zählvariable an.

‎web/lessons/en/13-for-schleife.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ kurz: Count a fixed number of passes with Init, Condition and Step.
1717

1818
In the while loop you already counted along: a start value before the loop, a condition in the head, a change inside. The **for loop** puts these three parts together in the head. That way you see at a glance how it counts.
1919

20+
::: grafik l12-while-zu-for.svg animiert
21+
The while loop becomes a for loop: init, condition and step move together into the head.
22+
:::
23+
2024
When you click a for loop, it has three fields on the right:
2125

2226
- **Init:** `int i = 1` creates the counter variable.

‎web/lessons/pt/13-for-schleife.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ kurz: Contar um número fixo de iterações com Início, Condição e Passo.
1717

1818
No ciclo while já foste contando: um valor inicial antes do ciclo, uma condição na cabeça, uma alteração no interior. O **ciclo for** junta estas três partes na cabeça. Assim vês num relance como ele conta.
1919

20+
::: grafik l12-while-zu-for.svg animiert
21+
O ciclo while torna-se um ciclo for: o início, a condição e o passo juntam-se na cabeça.
22+
:::
23+
2024
Quando clicas num ciclo for, ele tem três campos à direita:
2125

2226
- **Início:** `int i = 1` cria a variável contadora.

‎web/package-lock.json‎

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎web/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "visustruct-web",
33
"private": true,
4-
"version": "0.14.23",
4+
"version": "0.14.24",
55
"type": "module",
66
"scripts": {
77
"dev": "vite",

‎web/src/i18n/de.strings‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@
7272
"web_learn_solve_in_code" = "Löse diese Übung im %@.";
7373
"web_learn_solve_in_both" = "Löse diese Übung im %1$@ und im %2$@.";
7474
"web_learn_open_in_editor" = "Im Editor öffnen";
75+
"web_learn_replay" = "Noch einmal abspielen";
7576
"web_learn_graphic_labels" = "👆 Klick aufs Bild: Beschriftung ein oder aus";
7677
"web_learn_check" = "Prüfen";
7778
"web_learn_hint" = "Tipp";

0 commit comments

Comments
 (0)