Update app.py
Browse files
app.py
CHANGED
|
@@ -785,33 +785,34 @@ Each plan must include a **single Scratch Hat Block** (e.g., 'event_whenflagclic
|
|
| 785 |
(([ballSpeed v]) * (1.1))
|
| 786 |
```
|
| 787 |
- **Every hat block script must end** with a final `end` on its own line.
|
|
|
|
| 788 |
3. **Opcode Lists**: include relevant Scratch opcodes grouped under `motion`, `control`, `operator`, `sensing`, `looks`, `sounds`, `events`, and `data`. List only the non-empty categories. Use exact opcodes.
|
| 789 |
4. Few Example of content of logics inside for a specific plan as scratch pseudo-code:
|
| 790 |
- example 1[continues moving objects]:
|
| 791 |
```
|
| 792 |
when green flag clicked
|
| 793 |
-
|
| 794 |
-
|
| 795 |
-
|
| 796 |
-
|
| 797 |
-
|
| 798 |
-
|
| 799 |
-
|
| 800 |
-
|
| 801 |
-
|
| 802 |
end
|
| 803 |
```
|
| 804 |
- example 2[jumping script of an plan]:
|
| 805 |
```
|
| 806 |
when [space v] key pressed
|
| 807 |
-
|
| 808 |
-
|
| 809 |
-
|
| 810 |
-
|
| 811 |
-
|
| 812 |
-
|
| 813 |
-
|
| 814 |
-
|
| 815 |
end
|
| 816 |
```
|
| 817 |
- example 3 [pattern for level up and increase difficulty]:
|
|
|
|
| 785 |
(([ballSpeed v]) * (1.1))
|
| 786 |
```
|
| 787 |
- **Every hat block script must end** with a final `end` on its own line.
|
| 788 |
+
- **Indent nested blocks by 4 spaces under their parent (`forever`, `if`, etc.).This is a critical requirement.**
|
| 789 |
3. **Opcode Lists**: include relevant Scratch opcodes grouped under `motion`, `control`, `operator`, `sensing`, `looks`, `sounds`, `events`, and `data`. List only the non-empty categories. Use exact opcodes.
|
| 790 |
4. Few Example of content of logics inside for a specific plan as scratch pseudo-code:
|
| 791 |
- example 1[continues moving objects]:
|
| 792 |
```
|
| 793 |
when green flag clicked
|
| 794 |
+
go to x: (240) y: (-100)
|
| 795 |
+
set [speed v] to (-5)
|
| 796 |
+
show variable [speed v]
|
| 797 |
+
forever
|
| 798 |
+
change x by ([speed v])
|
| 799 |
+
if <((x position)) < (-240)> then
|
| 800 |
+
go to x: (240) y: (-100)
|
| 801 |
+
end
|
| 802 |
+
end
|
| 803 |
end
|
| 804 |
```
|
| 805 |
- example 2[jumping script of an plan]:
|
| 806 |
```
|
| 807 |
when [space v] key pressed
|
| 808 |
+
if <((y position)) = (-100)> then
|
| 809 |
+
repeat (5)
|
| 810 |
+
change y by (100)
|
| 811 |
+
wait (0.1) seconds
|
| 812 |
+
change y by (-100)
|
| 813 |
+
wait (0.1) seconds
|
| 814 |
+
end
|
| 815 |
+
end
|
| 816 |
end
|
| 817 |
```
|
| 818 |
- example 3 [pattern for level up and increase difficulty]:
|