diff --git a/beispiel_aufgabensammlung.yaml b/beispiel_aufgabensammlung.yaml
new file mode 100644
index 0000000..8da2137
--- /dev/null
+++ b/beispiel_aufgabensammlung.yaml
@@ -0,0 +1,29 @@
+name: "Beispiel-Aufgabensammlung"
+protected: false
+duration_minutes: 0
+public_listing: false
+secret: "beispiel"
+language: "blockly"
+
+
+tasks:
+ "Einleitung: Bausteine zusammensetzen":
+ "training/training-intro": {stars: 4}
+ "Befehlsfolgen":
+ "training/training-sequence-marble": {stars: 4}
+ "Wiederholungen":
+ "Btraining/training-repeat-marble": {stars: 4}
+ "Muster malen":
+ "Btraining/training-repeat-paint": {stars: 4}
+ "Bedingte Anweisung":
+ "Btraining/training-repeat-if-paint": {stars: 4}
+ "Labyrinth":
+ "Btraining/training-repeat-if-obstacles": {stars: 4}
+ "Mehr Wiederholungen":
+ "Btraining/training-repeat-nested-marbles": {stars: 4}
+ "Zick-Zack":
+ "Btraining/training-repeat-nested-obstacles": {stars: 4}
+ "Murmeln finden":
+ "Btraining/training-repeat-nested-if-marbles": {stars: 4}
+ "Abschluss: Haus malen":
+ "Btraining/training-repeat-nested-if-paint": {stars: 4}
diff --git a/training/training-intro/bedienung.jpg b/training/training-intro/bedienung.jpg
new file mode 100644
index 0000000..88457eb
Binary files /dev/null and b/training/training-intro/bedienung.jpg differ
diff --git a/training/training-intro/ergebnis.jpg b/training/training-intro/ergebnis.jpg
new file mode 100644
index 0000000..7a231d3
Binary files /dev/null and b/training/training-intro/ergebnis.jpg differ
diff --git a/training/training-intro/geschwindigkeit.jpg b/training/training-intro/geschwindigkeit.jpg
new file mode 100644
index 0000000..cf3a1e7
Binary files /dev/null and b/training/training-intro/geschwindigkeit.jpg differ
diff --git a/training/training-intro/green.png b/training/training-intro/green.png
new file mode 100644
index 0000000..dc5ef2a
Binary files /dev/null and b/training/training-intro/green.png differ
diff --git a/training/training-intro/green_robot.png b/training/training-intro/green_robot.png
new file mode 100644
index 0000000..fc2d4ff
Binary files /dev/null and b/training/training-intro/green_robot.png differ
diff --git a/training/training-intro/icon.png b/training/training-intro/icon.png
new file mode 100644
index 0000000..271daad
Binary files /dev/null and b/training/training-intro/icon.png differ
diff --git a/training/training-intro/index.html b/training/training-intro/index.html
new file mode 100644
index 0000000..d5012c7
--- /dev/null
+++ b/training/training-intro/index.html
@@ -0,0 +1,89 @@
+
+
+
+
+
Murmeln verschieben
+
+
+
+
+
+
+
+
+ Programmiere den Roboter:
+
+ Der Roboter soll jeden Fisch aufheben und auf einer Insel ablegen.
+
+
+ Der Roboter kann höchstens einen Fisch auf einmal tragen.
+
+
+
+ Bitte schau dir vorab die Erläuterungen unter "weitere Hinweise" an.
+
+
+
+
+
+
Weitere Hinweise:
+
+
+ Mit dem Baustein kannst du prüfen, ob auf dem
+ Feld des Roboters ein Fisch liegt.
+
+
+ Mit dem Baustein kannst du prüfen, ob der Roboter auf einer Insel steht.
+
+
+
+
+ Der Roboter darf nicht versuchen, einen Fisch abzulegen, wenn er gar keinen Fisch
+ transportiert. Der Roboter hat keine Sensoren um zu prüfen, ob er einen Fisch transportiert. Er hat
+ auch kein Gedächtnis, mit dem er sich merken könnte, ob er bereits einen Fisch gefangen hat. Du
+ musst du dir also etwas
+ anderes überlegen.
+
+
+
+
+
+
+
Weitere Hinweise:
+
+
+ Mit der Funktion aufFisch()
kannst du prüfen, ob auf dem Feld des Roboters ein Fisch liegt.
+
+
+ Mit der Funktion aufInsel()
kannst du prüfen, ob der Roboter auf einer Insel steht.
+
+
+
+
+ Der Roboter darf nicht versuchen, einen Fisch abzulegen, wenn er gar keinen Fisch
+ transportiert. Der Roboter hat keine Sensoren um zu prüfen, ob er einen Fisch transportiert. Er hat
+ auch kein Gedächtnis, mit dem er sich merken könnte, ob er bereits einen Fisch gefangen hat. Du
+ musst du dir also etwas anderes überlegen.
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/training/training-repeat-nested-if-marbles/index_new_v1.html b/training/training-repeat-nested-if-marbles/index_new_v1.html
new file mode 100644
index 0000000..1b2b324
--- /dev/null
+++ b/training/training-repeat-nested-if-marbles/index_new_v1.html
@@ -0,0 +1,80 @@
+
+
+
+
+
+
training-repeat-nested-if-marbles
+
+
+
+
+
+
+
+
+
+
+
Murmeln verschieben
+
+
+
+
+
+
+
+
+
+ Programmiere den Roboter:
+ Der Roboter soll jede Murmel aufheben und in einem Loch ablegen.
+
+
+ Der Roboter kann höchstens eine Murmel auf einmal tragen.
+
+
+
+
+ Verwende den Baustein wiederhole
.
+ Verwende den Baustein falls
, um zu testen ob auf dem aktuellen Feld eine Murmel liegt oder ob sich auf dem aktuellen Feld ein Loch befindet.
+
+
+ Verwende Baustein wiederhole
ineinander verschachtelt.
+ Verwende den Baustein falls
, um zu testen ob auf dem aktuellen Feld eine Murmel liegt oder ob sich auf dem aktuellen Feld ein Loch befindet.
+
+
+
Der Roboter darf nicht versuchen, eine Murmel abzulegen, wenn er gar keine Murmel transportiert. Der Roboter hat keine Sensoren um zu prüfen, ob er eine Murmel transportiert. Er hat auch kein Gedächtnis, mit
+ dem er sich merken könnte, ob er bereits eine Murmel aufgehoben hat. Du musst dir also etwas anderes überlegen.
+
+
+
+
+
+
+
+
+
+
diff --git a/training/training-repeat-nested-if-marbles/marble.png b/training/training-repeat-nested-if-marbles/marble.png
new file mode 100644
index 0000000..990bfd6
Binary files /dev/null and b/training/training-repeat-nested-if-marbles/marble.png differ
diff --git a/training/training-repeat-nested-if-marbles/task.js b/training/training-repeat-nested-if-marbles/task.js
new file mode 100644
index 0000000..d9498b5
--- /dev/null
+++ b/training/training-repeat-nested-if-marbles/task.js
@@ -0,0 +1,85 @@
+function initTask(subTask) {
+ var cellSide = 60;
+
+ subTask.gridInfos = {
+ hideSaveOrLoad: true,
+ cellSide: cellSide,
+ actionDelay: 200,
+ itemTypes: {
+ green_robot: { img: "green_robot.png", side: 80, nbStates: 9, isObstacle: true, offsetX: -14, category: "robot", team: 0, zOrder: 2 },
+ hole: { num: 2, img: "hole.png", side: cellSide, category: "hole", isObstacle: false, isHole: true, zOrder: 0 },
+ marble: { num: 3, img: "marble.png", side: cellSide, category: "marble", isObstacle: false, isTransportable: true, zOrder: 1 },
+ },
+ maxInstructions: 22,
+ includeBlocks: {
+ groupByCategory: false,
+ generatedBlocks: {
+ robot: ["east", "west", "north", "pickTransportable", "dropTransportable", "onTransportable", "onHole"]
+ },
+ standardBlocks: {
+ includeAll: false,
+ wholeCategories: [],
+ singleBlocks: ["controls_repeat", "controls_if"]
+ },
+ },
+ blocklyColourTheme: "bwinf",
+ ignoreInvalidMoves: false,
+ checkEndEveryTurn: false,
+ checkEndCondition: robotEndConditions.checkMarblesInHoles,
+ };
+
+ subTask.data = {
+ easy: [
+ {
+ tiles: [
+ [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
+ [1, 3, 1, 2, 3, 1, 1, 2, 1, 3, 2, 1, 1, 3, 2, 3, 2, 1],
+ [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
+ ],
+ initItems: [
+ { row: 1, col: 0, dir: 0, type: "green_robot" },
+ ]
+ }
+ ],
+ medium: [
+ {
+ tiles: [
+ [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
+ [1, 1, 1, 1, 1, 1, 3, 1, 1, 2, 1, 1, 1],
+ [1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1],
+ [1, 1, 1, 3, 1, 1, 1, 1, 2, 1, 1, 1, 1],
+ [1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 2, 1],
+ [1, 1, 3, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1],
+ [1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 2, 1, 1],
+ [1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1]
+ ],
+ initItems: [
+ { row: 7, col: 0, dir: 0, type: "green_robot" },
+ ]
+ }
+ ],
+ hard: [
+ {
+ tiles: [
+ [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
+ [1, 1, 1, 1, 1, 2, 1, 1, 3, 1, 1, 1, 1],
+ [1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1],
+ [1, 3, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1],
+ [1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 2, 1, 1],
+ [1, 1, 1, 2, 1, 1, 1, 1, 3, 1, 1, 1, 1],
+ [1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 3, 1],
+ [1, 3, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1]
+ ],
+ initItems: [
+ { row: 7, col: 0, dir: 0, type: "green_robot" },
+ ]
+ }
+ ]
+ };
+
+ initBlocklySubTask(subTask);
+ displayHelper.thresholdEasy = 120;
+ displayHelper.thresholdMedium = 240;
+}
+
+initWrapper(initTask, ["easy", "medium", "hard"], null, true);
diff --git a/training/training-repeat-nested-if-marbles/task_new.js b/training/training-repeat-nested-if-marbles/task_new.js
new file mode 100644
index 0000000..87f45b6
--- /dev/null
+++ b/training/training-repeat-nested-if-marbles/task_new.js
@@ -0,0 +1,372 @@
+function initTask(subTask) {
+ subTask.gridInfos = {
+ hideSaveOrLoad: true,
+ conceptViewer: false,
+ contextType: "fishing",
+ maxInstructions: 22,
+ includeBlocks: {
+ groupByCategory: false,
+ generatedBlocks: {
+ robot: ["east", "west", "north", "withdrawObject", "dropObject", "onObject", "onContainer"]
+ },
+ standardBlocks: {
+ includeAll: false,
+ wholeCategories: [],
+ singleBlocks: ["controls_repeat", "controls_if"]
+ },
+ pythonAdditionalFunctions: {
+ shared: ["range"]
+ },
+ },
+ blocklyColourTheme: "bwinf",
+ };
+
+ subTask.data = {
+ easy: [{
+ tiles: [
+ [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
+ [1, 5, 1, 6, 5, 1, 1, 6, 1, 5, 6, 1, 1, 5, 6, 5, 6, 1],
+ [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
+ ],
+ initItems: [{
+ row: 1,
+ col: 0,
+ type: "robot"
+ },
+ {
+ row: 1,
+ col: 1,
+ type: "net"
+ },
+ {
+ row: 1,
+ col: 4,
+ type: "net"
+ },
+ {
+ row: 1,
+ col: 9,
+ type: "net"
+ },
+ {
+ row: 1,
+ col: 13,
+ type: "net"
+ },
+ {
+ row: 1,
+ col: 15,
+ type: "net"
+ },
+ {
+ row: 1,
+ col: 3,
+ type: "island",
+ containerSize: 1
+ },
+ {
+ row: 1,
+ col: 7,
+ type: "island",
+ containerSize: 1
+ },
+ {
+ row: 1,
+ col: 10,
+ type: "island",
+ containerSize: 1
+ },
+ {
+ row: 1,
+ col: 14,
+ type: "island",
+ containerSize: 1
+ },
+ {
+ row: 1,
+ col: 16,
+ type: "island",
+ containerSize: 1
+ },
+ ].concat(initArray(1, {
+ row: 1,
+ col: 1,
+ type: "fishes"
+ }))
+ .concat(initArray(1, {
+ row: 1,
+ col: 4,
+ type: "fishes"
+ }))
+ .concat(initArray(1, {
+ row: 1,
+ col: 9,
+ type: "fishes"
+ })).concat(initArray(1, {
+ row: 1,
+ col: 13,
+ type: "fishes"
+ }))
+ .concat(initArray(1, {
+ row: 1,
+ col: 15,
+ type: "fishes"
+ }))
+ }],
+ medium: [{
+ tiles: [
+ [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
+ [1, 1, 1, 1, 1, 1, 5, 1, 1, 6, 1, 1, 1],
+ [1, 5, 1, 1, 1, 1, 1, 1, 1, 1, 6, 1, 1],
+ [1, 1, 1, 5, 1, 1, 1, 1, 6, 1, 1, 1, 1],
+ [1, 1, 1, 1, 5, 1, 1, 1, 1, 1, 1, 6, 1],
+ [1, 1, 5, 1, 1, 1, 1, 6, 1, 1, 1, 1, 1],
+ [1, 1, 1, 5, 1, 1, 1, 1, 1, 1, 6, 1, 1],
+ [1, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6, 1]
+ ],
+ initItems: [{
+ row: 7,
+ col: 0,
+ type: "robot"
+ },
+ {
+ row: 1,
+ col: 6,
+ type: "net"
+ },
+ {
+ row: 2,
+ col: 1,
+ type: "net"
+ },
+ {
+ row: 3,
+ col: 3,
+ type: "net"
+ },
+ {
+ row: 4,
+ col: 4,
+ type: "net"
+ },
+ {
+ row: 5,
+ col: 2,
+ type: "net"
+ },
+ {
+ row: 6,
+ col: 3,
+ type: "net"
+ },
+ {
+ row: 7,
+ col: 1,
+ type: "net"
+ },
+
+ {
+ row: 1,
+ col: 9,
+ type: "island",
+ containerSize: 1
+ },
+ {
+ row: 2,
+ col: 10,
+ type: "island",
+ containerSize: 1
+ },
+ {
+ row: 3,
+ col: 8,
+ type: "island",
+ containerSize: 1
+ },
+ {
+ row: 4,
+ col: 11,
+ type: "island",
+ containerSize: 1
+ },
+ {
+ row: 5,
+ col: 7,
+ type: "island",
+ containerSize: 1
+ },
+ {
+ row: 6,
+ col: 10,
+ type: "island",
+ containerSize: 1
+ },
+ {
+ row: 7,
+ col: 11,
+ type: "island",
+ containerSize: 1
+ },
+ ].concat(initArray(1, {
+ row: 1,
+ col: 6,
+ type: "fishes"
+ })).concat(initArray(1, {
+ row: 2,
+ col: 1,
+ type: "fishes"
+ })).concat(initArray(1, {
+ row: 3,
+ col: 3,
+ type: "fishes"
+ })).concat(initArray(1, {
+ row: 4,
+ col: 4,
+ type: "fishes"
+ })).concat(initArray(1, {
+ row: 5,
+ col: 2,
+ type: "fishes"
+ })).concat(initArray(1, {
+ row: 6,
+ col: 3,
+ type: "fishes"
+ })).concat(initArray(1, {
+ row: 7,
+ col: 1,
+ type: "fishes"
+ }))
+ }],
+ hard: [{
+ tiles: [
+ // 0 1 2 3 4 5 6 7 8 9 10 11 12
+ [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], //0
+ [1, 1, 1, 1, 1, 6, 1, 1, 5, 1, 1, 1, 1], //1
+ [1, 1, 5, 1, 1, 1, 1, 1, 1, 1, 1, 6, 1], //2
+ [1, 5, 1, 1, 1, 1, 1, 1, 6, 1, 1, 1, 1], //3
+ [1, 1, 1, 1, 1, 5, 1, 1, 1, 1, 6, 1, 1], //4
+ [1, 1, 1, 6, 1, 1, 1, 1, 5, 1, 1, 1, 1], //5
+ [1, 1, 1, 1, 6, 1, 1, 1, 1, 1, 1, 5, 1], //6
+ [1, 5, 1, 1, 1, 1, 1, 1, 1, 6, 1, 1, 1] //7
+ ],
+ initItems: [{
+ row: 7,
+ col: 0,
+ type: "robot"
+ },
+ {
+ row: 1,
+ col: 8,
+ type: "net"
+ },
+ {
+ row: 2,
+ col: 2,
+ type: "net"
+ },
+ {
+ row: 3,
+ col: 1,
+ type: "net"
+ },
+ {
+ row: 4,
+ col: 5,
+ type: "net"
+ },
+ {
+ row: 5,
+ col: 8,
+ type: "net"
+ },
+ {
+ row: 6,
+ col: 11,
+ type: "net"
+ },
+ {
+ row: 7,
+ col: 1,
+ type: "net"
+ },
+
+ {
+ row: 1,
+ col: 5,
+ type: "island",
+ containerSize: 1
+ },
+ {
+ row: 2,
+ col: 11,
+ type: "island",
+ containerSize: 1
+ },
+ {
+ row: 3,
+ col: 8,
+ type: "island",
+ containerSize: 1
+ },
+ {
+ row: 4,
+ col: 10,
+ type: "island",
+ containerSize: 1
+ },
+ {
+ row: 5,
+ col: 3,
+ type: "island",
+ containerSize: 1
+ },
+ {
+ row: 6,
+ col: 4,
+ type: "island",
+ containerSize: 1
+ },
+ {
+ row: 7,
+ col: 9,
+ type: "island",
+ containerSize: 1
+ },
+ ].concat(initArray(1, {
+ row: 1,
+ col: 8,
+ type: "fishes"
+ })).concat(initArray(1, {
+ row: 2,
+ col: 2,
+ type: "fishes"
+ })).concat(initArray(1, {
+ row: 3,
+ col: 1,
+ type: "fishes"
+ })).concat(initArray(1, {
+ row: 4,
+ col: 5,
+ type: "fishes"
+ })).concat(initArray(1, {
+ row: 5,
+ col: 8,
+ type: "fishes"
+ })).concat(initArray(1, {
+ row: 6,
+ col: 11,
+ type: "fishes"
+ })).concat(initArray(1, {
+ row: 7,
+ col: 1,
+ type: "fishes"
+ }))
+ }]
+ };
+
+ initBlocklySubTask(subTask);
+ displayHelper.thresholdEasy = 120;
+ displayHelper.thresholdMedium = 240;
+}
+
+initWrapper(initTask, ["easy", "medium", "hard"], null, true);
\ No newline at end of file
diff --git a/training/training-repeat-nested-if-marbles/task_new_v1.js b/training/training-repeat-nested-if-marbles/task_new_v1.js
new file mode 100644
index 0000000..a15f1f5
--- /dev/null
+++ b/training/training-repeat-nested-if-marbles/task_new_v1.js
@@ -0,0 +1,87 @@
+function initTask(subTask) {
+ var cellSide = 60;
+
+ subTask.gridInfos = {
+ hideSaveOrLoad: true,
+ conceptViewer: false,
+ contextType: "marbles",
+ //cellSide: cellSide,
+ actionDelay: 200,
+ //itemTypes: {
+ // green_robot: { img: "green_robot.png", side: 80, nbStates: 9, isObstacle: true, offsetX: -14, category: "robot", team: 0, zOrder: 2 },
+ // hole: { num: 2, img: "hole.png", side: cellSide, category: "hole", isObstacle: false, isHole: true, zOrder: 0 },
+ // marble: { num: 3, img: "marble.png", side: cellSide, category: "marble", isObstacle: false, isTransportable: true, zOrder: 1 },
+ //},
+ maxInstructions: 22,
+ includeBlocks: {
+ groupByCategory: false,
+ generatedBlocks: {
+ robot: ["east", "west", "north", "withdrawObject", "dropObject", "onObject", "onContainer"]
+ },
+ standardBlocks: {
+ includeAll: false,
+ wholeCategories: [],
+ singleBlocks: ["controls_repeat", "controls_if"]
+ },
+ },
+ blocklyColourTheme: "bwinf",
+ ignoreInvalidMoves: false,
+ checkEndEveryTurn: false,
+ checkEndCondition: robotEndConditions.checkMarblesInHoles,
+ };
+
+ subTask.data = {
+ easy: [
+ {
+ tiles: [
+ [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
+ [1, 4, 1, 3, 4, 1, 1, 3, 1, 4, 3, 1, 1, 4, 3, 4, 3, 1],
+ [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
+ ],
+ initItems: [
+ { row: 1, col: 0, type: "robot" },
+ ]
+ }
+ ],
+ medium: [
+ {
+ tiles: [
+ [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
+ [1, 1, 1, 1, 1, 1, 4, 1, 1, 3, 1, 1, 1],
+ [1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1],
+ [1, 1, 1, 4, 1, 1, 1, 1, 3, 1, 1, 1, 1],
+ [1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 3, 1],
+ [1, 1, 4, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1],
+ [1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 3, 1, 1],
+ [1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1]
+ ],
+ initItems: [
+ { row: 7, col: 0, type: "robot" },
+ ]
+ }
+ ],
+ hard: [
+ {
+ tiles: [
+ [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
+ [1, 1, 1, 1, 1, 3, 1, 1, 4, 1, 1, 1, 1],
+ [1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1],
+ [1, 4, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1],
+ [1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 3, 1, 1],
+ [1, 1, 1, 3, 1, 1, 1, 1, 4, 1, 1, 1, 1],
+ [1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 4, 1],
+ [1, 4, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1]
+ ],
+ initItems: [
+ { row: 7, col: 0, type: "robot" },
+ ]
+ }
+ ]
+ };
+
+ initBlocklySubTask(subTask);
+ displayHelper.thresholdEasy = 120;
+ displayHelper.thresholdMedium = 240;
+}
+
+initWrapper(initTask, ["easy", "medium", "hard"], null, true);
diff --git a/training/training-repeat-nested-if-paint/green_robot.png b/training/training-repeat-nested-if-paint/green_robot.png
new file mode 100644
index 0000000..fc2d4ff
Binary files /dev/null and b/training/training-repeat-nested-if-paint/green_robot.png differ
diff --git a/training/training-repeat-nested-if-paint/icon.png b/training/training-repeat-nested-if-paint/icon.png
new file mode 100644
index 0000000..3ab9913
Binary files /dev/null and b/training/training-repeat-nested-if-paint/icon.png differ
diff --git a/training/training-repeat-nested-if-paint/index.html b/training/training-repeat-nested-if-paint/index.html
new file mode 100644
index 0000000..5a7171f
--- /dev/null
+++ b/training/training-repeat-nested-if-paint/index.html
@@ -0,0 +1,71 @@
+
+
+
+
+
+
training-repeat-nested-if-paint
+
+
+
+
+
+
+
+
+
+
+
Male das Haus
+
+
+
+
+
+
+
+
+
+ Programmiere den Roboter:
+ Der Roboter soll alle markierten Felder färben.
+
+
+
+
+ Verwende dafür den Baustein wiederhole
ineinander verschachtelt.
+ Verwende den Baustein falls
, um zu testen ob das aktuelle Feld markiert ist.
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/training/training-repeat-nested-if-paint/index_new.html b/training/training-repeat-nested-if-paint/index_new.html
new file mode 100644
index 0000000..32d8729
--- /dev/null
+++ b/training/training-repeat-nested-if-paint/index_new.html
@@ -0,0 +1,64 @@
+
+
+
+
+
+
training-repeat-nested-if-paint
+
+
+
+
+
+
+
+
+
+
+
Male das Haus
+
+
+
+
+
+
+
+
+
+ Programmiere den Roboter:
+ Der Roboter soll alle markierten Felder färben.
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/training/training-repeat-nested-if-paint/marker.png b/training/training-repeat-nested-if-paint/marker.png
new file mode 100644
index 0000000..efd3457
Binary files /dev/null and b/training/training-repeat-nested-if-paint/marker.png differ
diff --git a/training/training-repeat-nested-if-paint/paint.png b/training/training-repeat-nested-if-paint/paint.png
new file mode 100644
index 0000000..32e9406
Binary files /dev/null and b/training/training-repeat-nested-if-paint/paint.png differ
diff --git a/training/training-repeat-nested-if-paint/task.js b/training/training-repeat-nested-if-paint/task.js
new file mode 100644
index 0000000..618c6ba
--- /dev/null
+++ b/training/training-repeat-nested-if-paint/task.js
@@ -0,0 +1,59 @@
+function initTask(subTask) {
+ var cellSide = 60;
+
+ subTask.gridInfos = {
+ hideSaveOrLoad: true,
+ cellSide: cellSide,
+ actionDelay: 200,
+ itemTypes: {
+ green_robot: { img: "green_robot.png", side: 80, nbStates: 9, isObstacle: true, offsetX: -14, category: "robot", team: 0, zOrder: 2 },
+ paint: { img: "paint.png", side: cellSide, category: "paint", isPaint: true, isObstacle: false, hasColor: true, color: "gris", zOrder: 1 },
+ marker: { num: 2, img: "marker.png", side: cellSide, category: "marker", isObstacle: false, isMarker: true, zOrder: 0 }
+ },
+ maxInstructions: 15,
+ includeBlocks: {
+ groupByCategory: false,
+ generatedBlocks: {
+ robot: ["east", "west", "north", "south", "paint", "markedCell"]
+ },
+ standardBlocks: {
+ includeAll: false,
+ wholeCategories: [],
+ singleBlocks: ["controls_repeat", "controls_if"]
+ },
+ },
+ blocklyColourTheme: "bwinf",
+ ignoreInvalidMoves: false,
+ checkEndEveryTurn: false,
+ checkEndCondition: robotEndConditions.checkMarkersPainted,
+ };
+
+ subTask.data = {
+ easy: [
+ {
+ tiles: [
+ [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
+ [1, 1, 1, 1, 2, 2, 1, 1, 1, 1],
+ [1, 1, 1, 2, 1, 1, 2, 1, 1, 1],
+ [1, 1, 2, 1, 1, 1, 1, 2, 1, 1],
+ [1, 2, 1, 1, 1, 1, 1, 1, 2, 1],
+ [1, 2, 1, 1, 1, 1, 1, 1, 2, 1],
+ [1, 2, 1, 1, 2, 2, 1, 1, 2, 1],
+ [1, 2, 1, 1, 2, 2, 1, 1, 2, 1],
+ [1, 2, 2, 2, 2, 2, 2, 2, 2, 1],
+ [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
+ ],
+ initItems: [
+ { row: 9, col: 0, dir: 0, type: "green_robot" }
+ ]
+ }
+ ]
+ };
+
+ initBlocklySubTask(subTask);
+ displayHelper.thresholdEasy = 5000;
+ displayHelper.thresholdMedium = 10000;
+}
+
+initWrapper(initTask, null, null, true);
+
diff --git a/training/training-repeat-nested-if-paint/task_new.js b/training/training-repeat-nested-if-paint/task_new.js
new file mode 100644
index 0000000..a88de54
--- /dev/null
+++ b/training/training-repeat-nested-if-paint/task_new.js
@@ -0,0 +1,64 @@
+function initTask(subTask) {
+ var cellSide = 60;
+
+ subTask.gridInfos = {
+ hideSaveOrLoad: true,
+ conceptViewer: false,
+ contextType: "paint",
+ //cellSide: cellSide,
+ actionDelay: 200,
+ //itemTypes: {
+ // green_robot: { img: "green_robot.png", side: 80, nbStates: 9, isObstacle: true, offsetX: -14, category: "robot", team: 0, zOrder: 2 },
+ // paint: { img: "paint.png", side: cellSide, category: "paint", isPaint: true, isObstacle: false, hasColor: true, color: "gris", zOrder: 1 },
+ // marker: { num: 2, img: "marker.png", side: cellSide, category: "marker", isObstacle: false, isMarker: true, zOrder: 0 }
+ //},
+ maxInstructions: 15,
+ includeBlocks: {
+ groupByCategory: false,
+ generatedBlocks: {
+ robot: ["east", "west", "north", "south", "dropObject", "onContainer"]
+ },
+ standardBlocks: {
+ includeAll: false,
+ wholeCategories: [],
+ singleBlocks: ["controls_repeat", "controls_if"]
+ },
+ pythonAdditionalFunctions: {
+ shared: ["range"]
+ },
+ },
+ blocklyColourTheme: "bwinf",
+ ignoreInvalidMoves: false,
+ checkEndEveryTurn: false,
+ checkEndCondition: robotEndConditions.checkMarkersPainted,
+ };
+
+ subTask.data = {
+ easy: [
+ {
+ tiles: [
+ [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
+ [1, 1, 1, 1, 2, 2, 1, 1, 1, 1],
+ [1, 1, 1, 2, 1, 1, 2, 1, 1, 1],
+ [1, 1, 2, 1, 1, 1, 1, 2, 1, 1],
+ [1, 2, 1, 1, 1, 1, 1, 1, 2, 1],
+ [1, 2, 1, 1, 1, 1, 1, 1, 2, 1],
+ [1, 2, 1, 1, 2, 2, 1, 1, 2, 1],
+ [1, 2, 1, 1, 2, 2, 1, 1, 2, 1],
+ [1, 2, 2, 2, 2, 2, 2, 2, 2, 1],
+ [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
+ ],
+ initItems: [
+ { row: 9, col: 0, type: "robot" }
+ ]
+ }
+ ]
+ };
+
+ initBlocklySubTask(subTask);
+ displayHelper.thresholdEasy = 5000;
+ displayHelper.thresholdMedium = 10000;
+}
+
+initWrapper(initTask, null, null, true);
+
diff --git a/training/training-repeat-nested-marbles/Parameter.png b/training/training-repeat-nested-marbles/Parameter.png
new file mode 100644
index 0000000..60c090b
Binary files /dev/null and b/training/training-repeat-nested-marbles/Parameter.png differ
diff --git a/training/training-repeat-nested-marbles/example_nested_repeat.png b/training/training-repeat-nested-marbles/example_nested_repeat.png
new file mode 100644
index 0000000..2b3e1b2
Binary files /dev/null and b/training/training-repeat-nested-marbles/example_nested_repeat.png differ
diff --git a/training/training-repeat-nested-marbles/example_nested_repeat_python.png b/training/training-repeat-nested-marbles/example_nested_repeat_python.png
new file mode 100644
index 0000000..6070cdd
Binary files /dev/null and b/training/training-repeat-nested-marbles/example_nested_repeat_python.png differ
diff --git a/training/training-repeat-nested-marbles/example_nested_repeat_scratch.png b/training/training-repeat-nested-marbles/example_nested_repeat_scratch.png
new file mode 100644
index 0000000..b4b0aa4
Binary files /dev/null and b/training/training-repeat-nested-marbles/example_nested_repeat_scratch.png differ
diff --git a/training/training-repeat-nested-marbles/green_robot.png b/training/training-repeat-nested-marbles/green_robot.png
new file mode 100644
index 0000000..fc2d4ff
Binary files /dev/null and b/training/training-repeat-nested-marbles/green_robot.png differ
diff --git a/training/training-repeat-nested-marbles/hole.png b/training/training-repeat-nested-marbles/hole.png
new file mode 100644
index 0000000..aa407b6
Binary files /dev/null and b/training/training-repeat-nested-marbles/hole.png differ
diff --git a/training/training-repeat-nested-marbles/icon.png b/training/training-repeat-nested-marbles/icon.png
new file mode 100644
index 0000000..f6bb137
Binary files /dev/null and b/training/training-repeat-nested-marbles/icon.png differ
diff --git a/training/training-repeat-nested-marbles/index.html b/training/training-repeat-nested-marbles/index.html
new file mode 100644
index 0000000..888f71f
--- /dev/null
+++ b/training/training-repeat-nested-marbles/index.html
@@ -0,0 +1,90 @@
+
+
+
+
+
training-repeat-nested-marbles
+
+
+
+
+
+
+
+
+
+
Murmeln verschieben
+
+
+
+
+
+
+
+
+
+ Programmiere den Roboter:
+ Der Roboter soll jede Murmel aufheben und in dem entsprechenden Loch in der jeweiligen Zeile ablegen.
+
+
+ Der Roboter kann höchstens eine Murmel auf einmal tragen.
+
+
+
+
+ Du wirst dafür
+ mehrmals den Bausteine wiederhole
ineinander verschachtelt verwenden
+ müssen, so wie hier gezeigt:
+
+
+
+
+
+
+ Du wirst dafür mehrere
for
-Anweisungen ineinander verschachteln müssen, so wie hier gezeigt:
+
+for i in range(5):
+ rechts()
+ for j in range(3):
+ oben()
+ rechts()
+
+
+ Dabei wird der Block, mit einer Einrückung insgesamt 5-Mal ausgeführt. Der Roboter geht also 5-Mal: einen Schritt nach rechts,
+ drei nach oben (die zweite for
-Anweisung) und wieder einen Schritt nach rechts. Dabei ist es wichtig, dass die Variable, welche in der for
-Anweisung
+ benutzt wird loop
, i
, j
, etc. nicht gleich ist, wenn die Wiederholungsanweisungen ineinander geschachtelt sind.
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/training/training-repeat-nested-marbles/index_new.html b/training/training-repeat-nested-marbles/index_new.html
new file mode 100644
index 0000000..eeee393
--- /dev/null
+++ b/training/training-repeat-nested-marbles/index_new.html
@@ -0,0 +1,117 @@
+
+
+
+
+
+
training-repeat-nested-marbles
+
+
+
+
+
+
+
+
+
+
+
Murmeln verschieben
+
+
+
+
+
+
+
+
+ Programmiere den Roboter:
+
+ Der Roboter soll jeden Fisch aufheben und auf der entsprechenden Insel in der
+ jeweiligen Zeile ablegen.
+
+
+ Der Roboter kann höchstens einen Fisch auf einmal tragen.
+
+
+ Bitte schau dir vorab die Erläuterungen Erläuterungen der Bausteine unter "weitere Hinweise" an.
+
+
+ Bitte schau dir vorab die Erläuterungen unter "weitere Hinweise" an.
+
+
+
Weitere Hinweise:
+
+
+ Die Zahl am Netz zeigt jeweils an, wie viele Fische enthalten sind.
+ Die Zahl an der Insel zeigt jeweils an, wie viele Fische bestellt wurden und abgeliefert werden
+ sollen.
+
+
+
+ Als Erinnerung:
+
+for loop in range(5):
+ rechts()
+ oben()
+
+ Dieser Code lässt den Roboter fünf Mal einen Schritt nach rechts und einen Schritt nach oben gehen.
+
+
+
+
+
+ Du kannst den Bausteine wiederhole
mehrmals ineinander verschachtelt verwenden:
+
+
+
+
+
+ Du wirst dafür mehrere
for
-Anweisungen ineinander verschachteln müssen, so wie hier im Beispiel
+ gezeigt:
+
+
+
+ Dabei wird alles, was beim grünen Block eingerückt ist, 5-Mal ausgeführt. Alle Befehle im orangenen Block werden 3-mal ausgeführt. Der Roboter geht also 5-Mal:
+ einen Schritt nach rechts, drei nach oben, einen Schritt nach rechts.
+
+ Anmerkung: Das Wort zwischen for
und in
ist nur ein Platzhalter, auch Variable genannt (dazu später mehr). Als Name kann hier alles verwendet werde, gesehen habe wir schon loop
, i
oder j
. Wichtig ist, dass bei zwei ineinander geschachtelten for
Schleifen nicht zwei Mal der gleiche Name verwendet wird.
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/training/training-repeat-nested-marbles/index_new_v1.html b/training/training-repeat-nested-marbles/index_new_v1.html
new file mode 100644
index 0000000..15bcf86
--- /dev/null
+++ b/training/training-repeat-nested-marbles/index_new_v1.html
@@ -0,0 +1,90 @@
+
+
+
+
+
training-repeat-nested-marbles
+
+
+
+
+
+
+
+
+
+
Murmeln verschieben
+
+
+
+
+
+
+
+
+
+ Programmiere den Roboter:
+ Der Roboter soll jede Murmel aufheben und in dem entsprechenden Loch in der jeweiligen Zeile ablegen.
+
+
+ Der Roboter kann höchstens eine Murmel auf einmal tragen.
+
+
+
+
+ Du wirst dafür
+ mehrmals den Bausteine wiederhole
ineinander verschachtelt verwenden
+ müssen, so wie hier gezeigt:
+
+
+
+
+
+
+ Du wirst dafür mehrere
for
-Anweisungen ineinander verschachteln müssen, so wie hier gezeigt:
+
+for i in range(5):
+ rechts()
+ for j in range(3):
+ oben()
+ rechts()
+
+
+ Dabei wird der Block, mit einer Einrückung insgesamt 5-Mal ausgeführt. Der Roboter geht also 5-Mal: einen Schritt nach rechts,
+ drei nach oben (die zweite for
-Anweisung) und wieder einen Schritt nach rechts. Dabei ist es wichtig, dass die Variable, welche in der for
-Anweisung
+ benutzt wird loop
, i
, j
, etc. nicht gleich ist, wenn die Wiederholungsanweisungen ineinander geschachtelt sind.
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/training/training-repeat-nested-marbles/marble.png b/training/training-repeat-nested-marbles/marble.png
new file mode 100644
index 0000000..990bfd6
Binary files /dev/null and b/training/training-repeat-nested-marbles/marble.png differ
diff --git a/training/training-repeat-nested-marbles/task.js b/training/training-repeat-nested-marbles/task.js
new file mode 100644
index 0000000..5164837
--- /dev/null
+++ b/training/training-repeat-nested-marbles/task.js
@@ -0,0 +1,81 @@
+function initTask(subTask) {
+ var cellSide = 60;
+
+ subTask.gridInfos = {
+ hideSaveOrLoad: true,
+ cellSide: cellSide,
+ actionDelay: 200,
+ itemTypes: {
+ green_robot: { img: "green_robot.png", side: 80, nbStates: 9, isObstacle: true, offsetX: -14, category: "robot", team: 0, zOrder: 2 },
+ hole: { num: 2, img: "hole.png", side: cellSide, category: "hole", isObstacle: false, isHole: true, zOrder: 0 },
+ marble: { num: 3, img: "marble.png", side: cellSide, category: "marble", isObstacle: false, isTransportable: true, zOrder: 1 },
+ },
+ maxInstructions: 15,
+ includeBlocks: {
+ groupByCategory: false,
+ generatedBlocks: {
+ robot: ["east", "west", "north", "pickTransportable", "dropTransportable"]
+ },
+ standardBlocks: {
+ includeAll: false,
+ wholeCategories: [],
+ singleBlocks: ["controls_repeat"]
+ },
+ },
+ blocklyColourTheme: "bwinf",
+ ignoreInvalidMoves: false,
+ checkEndEveryTurn: false,
+ checkEndCondition: robotEndConditions.checkMarblesInHoles,
+ };
+
+ subTask.data = {
+ easy: [
+ {
+ tiles: [
+ [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
+ [1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1],
+ [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
+ ],
+ initItems: [
+ { row: 1, col: 0, dir: 0, type: "green_robot" },
+ ]
+ }
+ ],
+ medium: [
+ {
+ tiles: [
+ [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
+ [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 2, 1],
+ [1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1],
+ [1, 1, 3, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1],
+ [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
+ ],
+ initItems: [
+ { row: 4, col: 0, dir: 0, type: "green_robot" },
+ ]
+ }
+ ],
+ hard: [
+ {
+ tiles: [
+ [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
+ [1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1],
+ [1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1],
+ [1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1],
+ [1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1],
+ [1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1],
+ [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
+ ],
+ initItems: [
+ { row: 6, col: 0, dir: 0, type: "green_robot" },
+ ]
+ }
+ ]
+ };
+
+ initBlocklySubTask(subTask);
+ displayHelper.thresholdEasy = 5000;
+ displayHelper.thresholdMedium = 10000;
+}
+
+initWrapper(initTask, ["easy", "medium", "hard"], null, true);
diff --git a/training/training-repeat-nested-marbles/task_new.js b/training/training-repeat-nested-marbles/task_new.js
new file mode 100644
index 0000000..18b0343
--- /dev/null
+++ b/training/training-repeat-nested-marbles/task_new.js
@@ -0,0 +1,261 @@
+function initTask(subTask) {
+ subTask.gridInfos = {
+ hideSaveOrLoad: true,
+ conceptViewer: false,
+ contextType: "fishing",
+ maxInstructions: 15,
+ includeBlocks: {
+ groupByCategory: false,
+ generatedBlocks: {
+ robot: ["east", "west", "north", "withdrawObject", "dropObject"]
+ },
+ standardBlocks: {
+ includeAll: false,
+ wholeCategories: [],
+ singleBlocks: ["controls_repeat"]
+ },
+ pythonAdditionalFunctions: {
+ shared: ["range"]
+ }
+ },
+ blocklyColourTheme: "bwinf",
+ };
+
+ subTask.data = {
+ easy: [{
+ tiles: [
+ [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
+ [1, 5, 6, 1, 5, 6, 1, 5, 6, 1, 5, 6, 1],
+ [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
+ ],
+ initItems: [{
+ row: 1,
+ col: 0,
+ type: "robot"
+ },
+ {
+ row: 1,
+ col: 1,
+ type: "net"
+ },
+ {
+ row: 1,
+ col: 4,
+ type: "net"
+ },
+ {
+ row: 1,
+ col: 7,
+ type: "net"
+ },
+ {
+ row: 1,
+ col: 10,
+ type: "net"
+ },
+ {
+ row: 1,
+ col: 2,
+ type: "island",
+ containerSize: 1
+ },
+ {
+ row: 1,
+ col: 5,
+ type: "island",
+ containerSize: 1
+ },
+ {
+ row: 1,
+ col: 8,
+ type: "island",
+ containerSize: 1
+ },
+ {
+ row: 1,
+ col: 11,
+ type: "island",
+ containerSize: 1
+ },
+ ].concat(initArray(1, {
+ row: 1,
+ col: 1,
+ type: "fishes"
+ }))
+ .concat(initArray(1, {
+ row: 1,
+ col: 4,
+ type: "fishes"
+ }))
+ .concat(initArray(1, {
+ row: 1,
+ col: 7,
+ type: "fishes"
+ })).concat(initArray(1, {
+ row: 1,
+ col: 10,
+ type: "fishes"
+ }))
+
+ }],
+ medium: [{
+ tiles: [
+ [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
+ [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 1, 1, 1, 6, 1],
+ [1, 1, 1, 1, 1, 1, 5, 1, 1, 1, 1, 6, 1, 1, 1, 1, 1],
+ [1, 1, 5, 1, 1, 1, 1, 6, 1, 1, 1, 1, 1, 1, 1, 1, 1],
+ [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
+ ],
+ initItems: [{
+ row: 4,
+ col: 0,
+ type: "robot"
+ }, {
+ row: 3,
+ col: 2,
+ type: "net"
+ },
+ {
+ row: 2,
+ col: 6,
+ type: "net"
+ },
+ {
+ row: 1,
+ col: 10,
+ type: "net"
+ },
+ {
+ row: 3,
+ col: 7,
+ type: "island",
+ containerSize: 1
+ },
+ {
+ row: 2,
+ col: 11,
+ type: "island",
+ containerSize: 1
+ },
+ {
+ row: 1,
+ col: 15,
+ type: "island",
+ containerSize: 1
+ },
+ ].concat(initArray(1, {
+ row: 3,
+ col: 2,
+ type: "fishes"
+ }))
+ .concat(initArray(1, {
+ row: 2,
+ col: 6,
+ type: "fishes"
+ }))
+ .concat(initArray(1, {
+ row: 1,
+ col: 10,
+ type: "fishes"
+ }))
+ }],
+ hard: [{
+ tiles: [
+ [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
+ [1, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6, 1],
+ [1, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6, 1],
+ [1, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6, 1],
+ [1, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6, 1],
+ [1, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6, 1],
+ [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
+ ],
+ initItems: [{
+ row: 6,
+ col: 0,
+ type: "robot"
+ },
+ {
+ row: 1,
+ col: 1,
+ type: "net"
+ },
+ {
+ row: 2,
+ col: 1,
+ type: "net"
+ },
+ {
+ row: 3,
+ col: 1,
+ type: "net"
+ },
+ {
+ row: 4,
+ col: 1,
+ type: "net"
+ },
+ {
+ row: 5,
+ col: 1,
+ type: "net"
+ },
+ {
+ row: 1,
+ col: 11,
+ type: "island",
+ containerSize: 1
+ },
+ {
+ row: 2,
+ col: 11,
+ type: "island",
+ containerSize: 1
+ },
+ {
+ row: 3,
+ col: 11,
+ type: "island",
+ containerSize: 1
+ },
+ {
+ row: 4,
+ col: 11,
+ type: "island",
+ containerSize: 1
+ },
+ {
+ row: 5,
+ col: 11,
+ type: "island",
+ containerSize: 1
+ },
+ ].concat(initArray(1, {
+ row: 1,
+ col: 1,
+ type: "fishes"
+ })).concat(initArray(1, {
+ row: 2,
+ col: 1,
+ type: "fishes"
+ })).concat(initArray(1, {
+ row: 3,
+ col: 1,
+ type: "fishes"
+ })).concat(initArray(1, {
+ row: 4,
+ col: 1,
+ type: "fishes"
+ })).concat(initArray(1, {
+ row: 5,
+ col: 1,
+ type: "fishes"
+ }))
+ }]
+ };
+
+ initBlocklySubTask(subTask);
+ displayHelper.thresholdEasy = 5000;
+ displayHelper.thresholdMedium = 10000;
+}
+
+initWrapper(initTask, ["easy", "medium", "hard"], null, true)
\ No newline at end of file
diff --git a/training/training-repeat-nested-marbles/task_new_v1.js b/training/training-repeat-nested-marbles/task_new_v1.js
new file mode 100644
index 0000000..bd018c5
--- /dev/null
+++ b/training/training-repeat-nested-marbles/task_new_v1.js
@@ -0,0 +1,86 @@
+function initTask(subTask) {
+ var cellSide = 60;
+
+ subTask.gridInfos = {
+ hideSaveOrLoad: true,
+ conceptViewer: false,
+ contextType: "marbles",
+ //cellSide: cellSide,
+ actionDelay: 200,
+ //itemTypes: {
+ // green_robot: { img: "green_robot.png", side: 80, nbStates: 9, isObstacle: true, offsetX: -14, category: "robot", team: 0, zOrder: 2 },
+ // hole: { num: 2, img: "hole.png", side: cellSide, category: "hole", isObstacle: false, isHole: true, zOrder: 0 },
+ // marble: { num: 3, img: "marble.png", side: cellSide, category: "marble", isObstacle: false, isTransportable: true, zOrder: 1 },
+ //},
+ maxInstructions: 15,
+ includeBlocks: {
+ groupByCategory: false,
+ generatedBlocks: {
+ robot: ["east", "west", "north", "withdrawObject", "dropObject"]
+ },
+ standardBlocks: {
+ includeAll: false,
+ wholeCategories: [],
+ singleBlocks: ["controls_repeat"]
+ },
+ pythonAdditionalFunctions: {
+ shared: ["range"]
+ },
+ },
+ blocklyColourTheme: "bwinf",
+ ignoreInvalidMoves: false,
+ checkEndEveryTurn: false,
+ //checkEndCondition: robotEndConditions.checkMarblesInHoles,
+ };
+
+ subTask.data = {
+ easy: [
+ {
+ tiles: [
+ [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
+ [1, 4, 3, 1, 4, 3, 1, 4, 3, 1, 4, 3, 1],
+ [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
+ ],
+ initItems: [
+ { row: 1, col: 0, type: "robot" },
+ ]
+ }
+ ],
+ medium: [
+ {
+ tiles: [
+ [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
+ [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 3, 1],
+ [1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1],
+ [1, 1, 4, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1],
+ [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
+ ],
+ initItems: [
+ { row: 4, col: 0, type: "robot" },
+ ]
+ }
+ ],
+ hard: [
+ {
+ tiles: [
+ [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
+ [1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1],
+ [1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1],
+ [1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1],
+ [1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1],
+ [1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1],
+ [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
+ ],
+ initItems: [
+ { row: 6, col: 0, type: "robot" },
+ ]
+ }
+ ]
+ };
+
+ initBlocklySubTask(subTask);
+ displayHelper.thresholdEasy = 5000;
+ displayHelper.thresholdMedium = 10000;
+}
+
+initWrapper(initTask, ["easy", "medium", "hard"], null, true);
diff --git a/training/training-repeat-nested-obstacles/example_nested_repeat.png b/training/training-repeat-nested-obstacles/example_nested_repeat.png
new file mode 100644
index 0000000..663928e
Binary files /dev/null and b/training/training-repeat-nested-obstacles/example_nested_repeat.png differ
diff --git a/training/training-repeat-nested-obstacles/green.png b/training/training-repeat-nested-obstacles/green.png
new file mode 100644
index 0000000..dc5ef2a
Binary files /dev/null and b/training/training-repeat-nested-obstacles/green.png differ
diff --git a/training/training-repeat-nested-obstacles/green_robot.png b/training/training-repeat-nested-obstacles/green_robot.png
new file mode 100644
index 0000000..fc2d4ff
Binary files /dev/null and b/training/training-repeat-nested-obstacles/green_robot.png differ
diff --git a/training/training-repeat-nested-obstacles/icon.png b/training/training-repeat-nested-obstacles/icon.png
new file mode 100644
index 0000000..8a5fef2
Binary files /dev/null and b/training/training-repeat-nested-obstacles/icon.png differ
diff --git a/training/training-repeat-nested-obstacles/index.html b/training/training-repeat-nested-obstacles/index.html
new file mode 100644
index 0000000..3156816
--- /dev/null
+++ b/training/training-repeat-nested-obstacles/index.html
@@ -0,0 +1,90 @@
+
+
+
+
+
training-repeat-nested-obstacles
+
+
+
+
+
+
+
+
+
+
Hindernislauf
+
+
+
+
+
+
+
+
+
+ Programmiere den Roboter:
+ Der Roboter soll das grüne Feld am Ende des Parcours erreichen, ohne gegen Hindernisse zu laufen.
+
+
+
+
+ Du wirst dafür
+ mehrmals den Bausteine wiederhole
ineinander verschachtelt verwenden
+ müssen, so wie hier gezeigt:
+
+
+
+
+
+
+
+
+
+
+
+
eine for
-Anweisung in einer anderen schreiben,
+
+for i in range(10):
+ for loop in range(5):
+ unten()
+ rechts()
+ for j in range(3):
+ oben()
+
+
+
+
+
Der Weg nach oben ist 10 Schritte lang.
+
+
+
+
+
+
+
+
+
diff --git a/training/training-repeat-nested-obstacles/index_new.html b/training/training-repeat-nested-obstacles/index_new.html
new file mode 100644
index 0000000..3c96a66
--- /dev/null
+++ b/training/training-repeat-nested-obstacles/index_new.html
@@ -0,0 +1,61 @@
+
+
+
+
+
training-repeat-nested-obstacles
+
+
+
+
+
+
+
+
+
+
Hindernislauf
+
+
+
+
+
+
+
+
+
+ Programmiere den Roboter:
+ Der Roboter soll die Flagge am Ende des Parcours erreichen, ohne gegen Hindernisse zu laufen.
+
+
Der Weg nach oben ist 10 Schritte lang.
+
+
+
+
+
+
+
+
+
diff --git a/training/training-repeat-nested-obstacles/obstacle.png b/training/training-repeat-nested-obstacles/obstacle.png
new file mode 100644
index 0000000..32c7e6b
Binary files /dev/null and b/training/training-repeat-nested-obstacles/obstacle.png differ
diff --git a/training/training-repeat-nested-obstacles/task.js b/training/training-repeat-nested-obstacles/task.js
new file mode 100644
index 0000000..cf42669
--- /dev/null
+++ b/training/training-repeat-nested-obstacles/task.js
@@ -0,0 +1,97 @@
+function initTask(subTask) {
+ var cellSide = 60;
+
+ subTask.gridInfos = {
+ hideSaveOrLoad: true,
+ cellSide: cellSide,
+ actionDelay: 200,
+ itemTypes: {
+ green_robot: { img: "green_robot.png", side: 80, nbStates: 9, isObstacle: true, offsetX: -14, category: "robot", team: 0 },
+ obstacle: { num: 2, img: "obstacle.png", side: cellSide, category: "obstacle", isObstacle: true },
+ green: { num: 3, img: "green.png", side: cellSide, category: "paint", isObstacle: false, color: "vert", },
+ },
+ maxInstructions: 16,
+ includeBlocks: {
+ groupByCategory: false,
+ generatedBlocks: {
+ robot: ["east", "north", "south"]
+ },
+ standardBlocks: {
+ includeAll: false,
+ wholeCategories: [],
+ singleBlocks: ["controls_repeat"]
+ },
+ },
+ blocklyColourTheme: "bwinf",
+ ignoreInvalidMoves: false,
+ checkEndEveryTurn: false,
+ checkEndCondition: robotEndConditions.checkReachGreenArea,
+ };
+
+ subTask.data = {
+ easy: [
+ {
+ tiles: [
+ [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2],
+ [2, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 2],
+ [2, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 3, 2],
+ [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]
+ ],
+ initItems: [
+ { row: 2, col: 1, dir: 0, type: "green_robot" }
+ ]
+ }
+ ],
+ medium: [
+ {
+ tiles: [
+ [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2],
+ [2, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 2],
+ [2, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 2],
+ [2, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 2],
+ [2, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 2],
+ [2, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 2],
+ [2, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 2],
+ [2, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 2],
+ [2, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 2],
+ [2, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 2],
+ [2, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 2],
+ [2, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 3, 2],
+ [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]
+ ],
+ initItems: [
+ { row: 11, col: 1, dir: 0, type: "green_robot" }
+ ]
+ }
+ ],
+ hard: [
+ {
+ tiles: [
+ [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2],
+ [2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 3, 2],
+ [2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2],
+ [2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2],
+ [2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2],
+ [2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2],
+ [2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2],
+ [2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2],
+ [2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2],
+ [2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2],
+ [2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2],
+ [2, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2],
+ [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]
+ ],
+ initItems: [
+ { row: 11, col: 1, dir: 0, type: "green_robot" }
+ ]
+ }
+ ]
+ };
+
+ initBlocklySubTask(subTask);
+ displayHelper.thresholdEasy = 5000;
+ displayHelper.thresholdMedium = 10000;
+}
+
+initWrapper(initTask, ["easy", "medium", "hard"], null, true);
+
diff --git a/training/training-repeat-nested-obstacles/task_new.js b/training/training-repeat-nested-obstacles/task_new.js
new file mode 100644
index 0000000..8f471ff
--- /dev/null
+++ b/training/training-repeat-nested-obstacles/task_new.js
@@ -0,0 +1,102 @@
+function initTask(subTask) {
+ var cellSide = 60;
+
+ subTask.gridInfos = {
+ hideSaveOrLoad: true,
+ conceptViewer: false,
+ contextType: "course",
+ //cellSide: cellSide,
+ actionDelay: 200,
+ //itemTypes: {
+ // green_robot: { img: "green_robot.png", side: 80, nbStates: 9, isObstacle: true, offsetX: -14, category: "robot", team: 0 },
+ // obstacle: { num: 2, img: "obstacle.png", side: cellSide, category: "obstacle", isObstacle: true },
+ // green: { num: 3, img: "green.png", side: cellSide, category: "paint", isObstacle: false, color: "vert", },
+ //},
+ maxInstructions: 16,
+ includeBlocks: {
+ groupByCategory: false,
+ generatedBlocks: {
+ robot: ["east", "north", "south"]
+ },
+ standardBlocks: {
+ includeAll: false,
+ wholeCategories: [],
+ singleBlocks: ["controls_repeat"]
+ },
+ pythonAdditionalFunctions: {
+ shared: ["range"]
+ }
+ },
+ blocklyColourTheme: "bwinf",
+ ignoreInvalidMoves: false,
+ checkEndEveryTurn: false,
+ //checkEndCondition: robotEndConditions.checkReachGreenArea,
+ };
+
+ subTask.data = {
+ easy: [
+ {
+ tiles: [
+ [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2],
+ [2, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 2],
+ [2, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 3, 2],
+ [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]
+ ],
+ initItems: [
+ { row: 2, col: 1,type: "robot" }
+ ]
+ }
+ ],
+ medium: [
+ {
+ tiles: [
+ [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2],
+ [2, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 2],
+ [2, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 2],
+ [2, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 2],
+ [2, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 2],
+ [2, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 2],
+ [2, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 2],
+ [2, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 2],
+ [2, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 2],
+ [2, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 2],
+ [2, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 2],
+ [2, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 3, 2],
+ [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]
+ ],
+ initItems: [
+ { row: 11, col: 1, type: "robot" }
+ ]
+ }
+ ],
+ hard: [
+ {
+ tiles: [
+ [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2],
+ [2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 3, 2],
+ [2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2],
+ [2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2],
+ [2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2],
+ [2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2],
+ [2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2],
+ [2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2],
+ [2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2],
+ [2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2],
+ [2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2],
+ [2, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2],
+ [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]
+ ],
+ initItems: [
+ { row: 11, col: 1, type: "robot" }
+ ]
+ }
+ ]
+ };
+
+ initBlocklySubTask(subTask);
+ displayHelper.thresholdEasy = 5000;
+ displayHelper.thresholdMedium = 10000;
+}
+
+initWrapper(initTask, ["easy", "medium", "hard"], null, true);
+
diff --git a/training/training-repeat-paint/example_repeat_1.png b/training/training-repeat-paint/example_repeat_1.png
new file mode 100644
index 0000000..408159c
Binary files /dev/null and b/training/training-repeat-paint/example_repeat_1.png differ
diff --git a/training/training-repeat-paint/example_repeat_2.png b/training/training-repeat-paint/example_repeat_2.png
new file mode 100644
index 0000000..eb4d0f0
Binary files /dev/null and b/training/training-repeat-paint/example_repeat_2.png differ
diff --git a/training/training-repeat-paint/green_robot.png b/training/training-repeat-paint/green_robot.png
new file mode 100644
index 0000000..fc2d4ff
Binary files /dev/null and b/training/training-repeat-paint/green_robot.png differ
diff --git a/training/training-repeat-paint/icon.png b/training/training-repeat-paint/icon.png
new file mode 100644
index 0000000..732effc
Binary files /dev/null and b/training/training-repeat-paint/icon.png differ
diff --git a/training/training-repeat-paint/index.html b/training/training-repeat-paint/index.html
new file mode 100644
index 0000000..195069e
--- /dev/null
+++ b/training/training-repeat-paint/index.html
@@ -0,0 +1,105 @@
+
+
+
+
+
+
training-repeat-paint
+
+
+
+
+
+
+
+
+
+
+
Treppe malen
+
+
+
+
+
+
+
+
+
+ Programmiere den Roboter:
+ Der Roboter soll die markierten Felder färben.
+
+
+
+ Benutze dafür
+ den Baustein wiederhole
, der
+ die Wiederholungsanweisung for
, die
+ dir erlaubt, eine oder mehrere Anweisungen mehrfach hintereinander auszuführen.
+
+
+
Statt zum Beispiel dreimal die gleichen zwei Bausteine zu verwenden,
+
+
+
+
+ kannst du den Baustein wiederhole 3 mal
verwenden:
+
+
+
+
Um die Anzahl der Wiederholungen zu ändern, kannst du auf die Zahl im Baustein klicken und eine
+ neue Zahl mit der Tastatur eingeben.
+
+
+
Statt zum Beispiel dreimal die gleichen zwei Befehle zu schreiben:
+
+ oben()
+ bemale()
+ oben()
+ bemale()
+ oben()
+ bemale()
+
+
benutze die Wiederholungsanweisung for
:
+
+ for loop in range(3):
+ oben()
+ bemale()
+
+
+ Die Zahl in der Klammer gibt die Anzahl der Wiederholungen an. Alle Befehle, die in der Wiederholungsanweisung ausgeführt
+ werden sollen, müssen eingerückt werden.
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/training/training-repeat-paint/index_new.html b/training/training-repeat-paint/index_new.html
new file mode 100644
index 0000000..18d0f21
--- /dev/null
+++ b/training/training-repeat-paint/index_new.html
@@ -0,0 +1,117 @@
+
+
+
+
+
+
training-repeat-paint
+
+
+
+
+
+
+
+
+
+
+
Treppe malen
+
+
+
+
+
+
+
+
+ Programmiere den Roboter:
+
+ Der Roboter soll die markierten Felder färben.
+
+
+ Bitte schau dir vorab die Erläuterungen der Bausteine unter "weitere Hinweise" an.
+
+
+ Bitte schau dir vorab die Erläuterungen unter "weitere Hinweise" an.
+
+
+
Weitere Hinweise:
+
+
+ Mit dem Baustein wiederhole
, kannst du eine oder mehrere Anweisungen mehrfach hintereinander ausführen.
+
+
+ Benutze dafür die Wiederholungsanweisung for
, die dir erlaubt, eine oder mehrere Anweisungen
+ mehrfach hintereinander auszuführen.
+
+
+
+
Statt zum Beispiel dreimal die gleichen zwei Bausteine zu verwenden,
+
+
+
+
+ kannst du den Baustein wiederhole
verwenden:
+
+
+
+
Um die Anzahl der Wiederholungen zu ändern, kannst du auf die Zahl im Baustein klicken und eine
+ neue Zahl mit der Tastatur eingeben.
+
+
+
Statt zum Beispiel dreimal die gleichen zwei Befehle zu schreiben:
+
+ oben()
+ bemale()
+ oben()
+ bemale()
+ oben()
+ bemale()
+
+
benutze die Wiederholungsanweisung for
:
+
+ for loop in range(3):
+ oben()
+ bemale()
+
+
+ Die Zahl in der Klammer gibt die Anzahl der Wiederholungen an. Alle Befehle, die in der
+ Wiederholungsanweisung ausgeführt
+ werden sollen, müssen eingerückt werden.
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/training/training-repeat-paint/marker.png b/training/training-repeat-paint/marker.png
new file mode 100644
index 0000000..efd3457
Binary files /dev/null and b/training/training-repeat-paint/marker.png differ
diff --git a/training/training-repeat-paint/paint.png b/training/training-repeat-paint/paint.png
new file mode 100644
index 0000000..32e9406
Binary files /dev/null and b/training/training-repeat-paint/paint.png differ
diff --git a/training/training-repeat-paint/task.js b/training/training-repeat-paint/task.js
new file mode 100644
index 0000000..2a6a6ab
--- /dev/null
+++ b/training/training-repeat-paint/task.js
@@ -0,0 +1,113 @@
+function initTask(subTask) {
+ var cellSide = 60;
+ subTask.gridInfos = {
+ hideSaveOrLoad: true,
+ cellSide: cellSide,
+ actionDelay: 200,
+ itemTypes: {
+ green_robot: {
+ img: "green_robot.png",
+ side: 80,
+ nbStates: 9,
+ isObstacle: true,
+ offsetX: -14,
+ category: "robot",
+ team: 0
+ },
+ paint: {
+ img: "paint.png",
+ side: cellSide,
+ category: "paint",
+ isPaint: true,
+ isObstacle: false,
+ hasColor: true,
+ color: "gris"
+ },
+ marker: {
+ num: 2,
+ img: "marker.png",
+ side: cellSide,
+ category: "marker",
+ isMarker: true,
+ isObstacle: false,
+ hasColor: true,
+ color: "marker"
+ }
+ },
+ maxInstructions: 20,
+ includeBlocks: {
+ groupByCategory: false,
+ generatedBlocks: {
+ robot: ["east", "north", "west", "south", "paint"]
+ },
+ standardBlocks: {
+ includeAll: false,
+ wholeCategories: [],
+ singleBlocks: ["controls_repeat"]
+ },
+ },
+ blocklyColourTheme: "bwinf",
+ ignoreInvalidMoves: false,
+ checkEndEveryTurn: false,
+ checkEndCondition: robotEndConditions.checkMarkersPainted,
+ };
+
+ subTask.data = {
+ easy: [{
+ tiles: [
+ [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
+ [1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1],
+ [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
+ ],
+ initItems: [{
+ row: 1,
+ col: 0,
+ dir: 0,
+ type: "green_robot"
+ }, ]
+ }],
+ medium: [{
+ tiles: [
+ [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
+ [1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1],
+ [1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1],
+ [1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1],
+ [1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1],
+ [1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1],
+ [1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1],
+ [1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1],
+ [1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1],
+ [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
+ ],
+ initItems: [{
+ row: 8,
+ col: 0,
+ dir: 0,
+ type: "green_robot"
+ }, ]
+ }],
+ hard: [{
+ tiles: [
+ [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
+ [1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1],
+ [1, 1, 1, 1, 1, 2, 2, 1, 2, 2, 1, 1, 1, 1, 1],
+ [1, 1, 1, 1, 2, 2, 1, 1, 1, 2, 2, 1, 1, 1, 1],
+ [1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1],
+ [1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1],
+ [1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1]
+ ],
+ initItems: [{
+ row: 6,
+ col: 0,
+ dir: 0,
+ type: "green_robot"
+ }, ]
+ }]
+ };
+
+ initBlocklySubTask(subTask);
+ displayHelper.thresholdEasy = 5000;
+ displayHelper.thresholdMedium = 10000;
+}
+
+initWrapper(initTask, ["easy", "medium", "hard"], null, true);
\ No newline at end of file
diff --git a/training/training-repeat-paint/task_new.js b/training/training-repeat-paint/task_new.js
new file mode 100644
index 0000000..c496ac0
--- /dev/null
+++ b/training/training-repeat-paint/task_new.js
@@ -0,0 +1,86 @@
+function initTask(subTask) {
+ var cellSide = 60;
+ subTask.gridInfos = {
+ hideSaveOrLoad: true,
+ conceptViewer: false,
+ contextType: "paint",
+ //cellSide: cellSide,
+ actionDelay: 200,
+
+ maxInstructions: 20,
+ includeBlocks: {
+ groupByCategory: false,
+ generatedBlocks: {
+ robot: ["east", "north", "west", "south", "dropObject"]
+ },
+ standardBlocks: {
+ includeAll: false,
+ wholeCategories: [],
+ singleBlocks: ["controls_repeat"]
+ },
+ pythonAdditionalFunctions: {
+ shared: ["range"]
+ }
+ },
+ blocklyColourTheme: "bwinf",
+ ignoreInvalidMoves: false,
+ checkEndEveryTurn: false,
+ //checkEndCondition: robotEndConditions.checkMarkersPainted,
+ };
+
+ subTask.data = {
+ easy: [{
+ tiles: [
+ [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
+ [1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1],
+ [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
+ ],
+ initItems: [{
+ row: 1,
+ col: 0,
+ type: "robot"
+ }, ]
+ }],
+ medium: [{
+ tiles: [
+ [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
+ [1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1],
+ [1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1],
+ [1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1],
+ [1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1],
+ [1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1],
+ [1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1],
+ [1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1],
+ [1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1],
+ [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
+ ],
+ initItems: [{
+ row: 8,
+ col: 0,
+ type: "robot"
+ }, ]
+ }],
+ hard: [{
+ tiles: [
+ [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
+ [1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1],
+ [1, 1, 1, 1, 1, 2, 2, 1, 2, 2, 1, 1, 1, 1, 1],
+ [1, 1, 1, 1, 2, 2, 1, 1, 1, 2, 2, 1, 1, 1, 1],
+ [1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1],
+ [1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1],
+ [1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1]
+ ],
+ initItems: [{
+ row: 6,
+ col: 0,
+ type: "robot"
+ }, ]
+ }]
+ };
+
+ initBlocklySubTask(subTask);
+ displayHelper.thresholdEasy = 5000;
+ displayHelper.thresholdMedium = 10000;
+}
+
+initWrapper(initTask, ["easy", "medium", "hard"], null, true);
\ No newline at end of file
diff --git a/training/training-sequence-marble/Menu.png b/training/training-sequence-marble/Menu.png
new file mode 100644
index 0000000..c941ad7
Binary files /dev/null and b/training/training-sequence-marble/Menu.png differ
diff --git a/training/training-sequence-marble/auto.png b/training/training-sequence-marble/auto.png
new file mode 100644
index 0000000..67c38a1
Binary files /dev/null and b/training/training-sequence-marble/auto.png differ
diff --git a/training/training-sequence-marble/green_robot.png b/training/training-sequence-marble/green_robot.png
new file mode 100644
index 0000000..fc2d4ff
Binary files /dev/null and b/training/training-sequence-marble/green_robot.png differ
diff --git a/training/training-sequence-marble/hole.png b/training/training-sequence-marble/hole.png
new file mode 100644
index 0000000..aa407b6
Binary files /dev/null and b/training/training-sequence-marble/hole.png differ
diff --git a/training/training-sequence-marble/icon.png b/training/training-sequence-marble/icon.png
new file mode 100644
index 0000000..168e09f
Binary files /dev/null and b/training/training-sequence-marble/icon.png differ
diff --git a/training/training-sequence-marble/index.html b/training/training-sequence-marble/index.html
new file mode 100644
index 0000000..e63f1db
--- /dev/null
+++ b/training/training-sequence-marble/index.html
@@ -0,0 +1,62 @@
+
+
+
+
+
training-sequence-marble
+
+
+
+
+
+
+
+
+
Murmeln verschieben
+
+
+
+
+
+
+
+
+
+ Programmiere den Roboter:
+ Er soll die Murmel im Loch ablegen
+
+
+ Programmiere den Roboter:
+ Er soll die beiden Murmel in die beiden Löcher legen.
+ Der Roboter kann höchstens eine Murmel tragen.
+
+
+
+
+
+
+
+
+
diff --git a/training/training-sequence-marble/index_new.html b/training/training-sequence-marble/index_new.html
new file mode 100644
index 0000000..ce17ef1
--- /dev/null
+++ b/training/training-sequence-marble/index_new.html
@@ -0,0 +1,75 @@
+
+
+
+
+
training-sequence-marble
+
+
+
+
+
+
+
+
+
Murmeln verschieben
+
+
+
+
+
+
+
+
+
Programmiere den Roboter:
+
+ Der Roboter soll die Murmel im Loch ablegen
+
+
+
+ Der Roboter soll die beiden Murmel in die beiden Löcher legen.
+ Der Roboter kann höchstens eine Murmel tragen.
+
+
Tipp:
+
+ Wenn du zu faul zum tippen bist, kannst du ab dem ersten Buchstaben Tabulator drücken und der Befehl wird automatisch mit dem ersten Vorschlag im angezeigten Menu vervollständigt. Als Beispiel siehe auch "Weiter Hinweise"
+
+
+ Entweder kann du direkt auf den gewünschten Befehl klicken, oder mit den Pfeiltasten und der Tabulatortaste (rot) arbeiten.
+
+
+
+
+
+
+
+
+
+
+
diff --git a/training/training-sequence-marble/marble.png b/training/training-sequence-marble/marble.png
new file mode 100644
index 0000000..990bfd6
Binary files /dev/null and b/training/training-sequence-marble/marble.png differ
diff --git a/training/training-sequence-marble/tab.png b/training/training-sequence-marble/tab.png
new file mode 100644
index 0000000..403ca85
Binary files /dev/null and b/training/training-sequence-marble/tab.png differ
diff --git a/training/training-sequence-marble/task.js b/training/training-sequence-marble/task.js
new file mode 100644
index 0000000..a2c2ab9
--- /dev/null
+++ b/training/training-sequence-marble/task.js
@@ -0,0 +1,75 @@
+function initTask(subTask) {
+ var cellSide = 60;
+
+ subTask.gridInfos = {
+ hideSaveOrLoad: true,
+ cellSide: cellSide,
+ actionDelay: 200,
+ itemTypes: {
+ green_robot: { img: "green_robot.png", side: 80, nbStates: 9, isObstacle: true, offsetX: -14, category: "robot", team: 0, zOrder: 2 },
+ hole: { num: 2, img: "hole.png", side: cellSide, category: "hole", isObstacle: false, isHole: true, zOrder: 0 },
+ marble: { num: 3, img: "marble.png", side: cellSide, category: "marble", isObstacle: false, isTransportable: true, zOrder: 1 },
+ },
+ maxInstructions: 20,
+ includeBlocks: {
+ groupByCategory: false,
+ generatedBlocks: {
+ robot: ["east", "west", "pickTransportable", "dropTransportable"]
+ },
+ standardBlocks: {
+ includeAll: false,
+ wholeCategories: [],
+ singleBlocks: []
+ }
+ },
+ blocklyColourTheme: "bwinf",
+ ignoreInvalidMoves: false,
+ checkEndEveryTurn: false,
+ checkEndCondition: robotEndConditions.checkMarblesInHoles,
+ };
+
+ subTask.data = {
+ easy: [
+ {
+ tiles: [
+ [1, 1, 1, 1, 1, 1, 1, 1, 1],
+ [1, 1, 1, 3, 1, 1, 2, 1, 1],
+ [1, 1, 1, 1, 1, 1, 1, 1, 1]
+ ],
+ initItems: [
+ { row: 1, col: 1, dir: 0, type: "green_robot" },
+ ]
+ }
+ ],
+ medium: [
+ {
+ tiles: [
+ [1, 1, 1, 1, 1, 1, 1, 1],
+ [1, 1, 1, 2, 1, 3, 1, 1],
+ [1, 1, 1, 1, 1, 1, 1, 1]
+ ],
+ initItems: [
+ { row: 1, col: 1, dir: 0, type: "green_robot" },
+ ]
+ }
+ ],
+ hard: [
+ {
+ tiles: [
+ [1, 1, 1, 1, 1, 1, 1, 1, 1],
+ [1, 1, 1, 3, 3, 1, 2, 2, 1],
+ [1, 1, 1, 1, 1, 1, 1, 1, 1]
+ ],
+ initItems: [
+ { row: 1, col: 1, dir: 0, type: "green_robot" },
+ ]
+ }
+ ]
+ };
+
+ initBlocklySubTask(subTask);
+ displayHelper.thresholdEasy = 5000;
+ displayHelper.thresholdMedium = 10000;
+}
+
+initWrapper(initTask, ["easy", "medium", "hard"], null, true);
diff --git a/training/training-sequence-marble/task_new.js b/training/training-sequence-marble/task_new.js
new file mode 100644
index 0000000..88d171d
--- /dev/null
+++ b/training/training-sequence-marble/task_new.js
@@ -0,0 +1,78 @@
+function initTask(subTask) {
+ var cellSide = 60;
+
+ subTask.gridInfos = {
+ conceptViewer: false,
+ contextType: "marbles",
+ blocklyColourTheme: "bwinf",
+ hideSaveOrLoad: true,
+ //cellSide: cellSide,
+ actionDelay: 200,
+ showCardinals: false,
+ //itemTypes: {
+ //green_robot: { img: "green_robot.png", side: 80, nbStates: 9, isObstacle: true, offsetX: -14, category: "robot", team: 0, zOrder: 2 },
+ //hole: { num: 2, img: "hole.png", side: cellSide, category: "hole", isObstacle: false, isHole: true, zOrder: 0 },
+ //marble: { num: 3, img: "marble.png", side: cellSide, category: "marble", isObstacle: false, isTransportable: true, zOrder: 1 },
+ //},
+ maxInstructions: 20,
+ includeBlocks: {
+ groupByCategory: false,
+ generatedBlocks: {
+ robot: ["east", "west", "withdrawObject", "dropObject"]
+ },
+ standardBlocks: {
+ includeAll: false,
+ wholeCategories: [],
+ singleBlocks: []
+ }
+ },
+ ignoreInvalidMoves: false,
+ checkEndEveryTurn: false,
+ //checkEndCondition: robotEndConditions.checkMarblesInHoles,
+ };
+
+ subTask.data = {
+ easy: [
+ {
+ tiles: [
+ [1, 1, 1, 1, 1, 1, 1, 1, 1],
+ [1, 1, 1, 4, 1, 1, 3, 1, 1],
+ [1, 1, 1, 1, 1, 1, 1, 1, 1]
+ ],
+ initItems: [
+ { row: 1, col: 1, type: "robot" },
+ ]
+ }
+ ],
+ medium: [
+ {
+ tiles: [
+ [1, 1, 1, 1, 1, 1, 1, 1],
+ [1, 1, 1, 3, 1, 4, 1, 1],
+ [1, 1, 1, 1, 1, 1, 1, 1]
+ ],
+ initItems: [
+ { row: 1, col: 1, type: "robot" },
+ ]
+ }
+ ],
+ hard: [
+ {
+ tiles: [
+ [1, 1, 1, 1, 1, 1, 1, 1, 1],
+ [1, 1, 1, 4, 4, 1, 3, 3, 1],
+ [1, 1, 1, 1, 1, 1, 1, 1, 1]
+ ],
+ initItems: [
+ { row: 1, col: 1, type: "robot" },
+ ]
+ }
+ ]
+ };
+
+ initBlocklySubTask(subTask);
+ displayHelper.thresholdEasy = 5000;
+ displayHelper.thresholdMedium = 10000;
+}
+
+initWrapper(initTask, ["easy", "medium", "hard"], null, true);