prthm11 commited on
Commit
3dc95b4
·
verified ·
1 Parent(s): 3e2a915

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -17
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
- go to x: (240) y: (-100)
794
- set [speed v] to (-5)
795
- show variable [speed v]
796
- forever
797
- change x by ([speed v])
798
- if <((x position)) < (-240)> then
799
- go to x: (240) y: (-100)
800
- end
801
- end
802
  end
803
  ```
804
  - example 2[jumping script of an plan]:
805
  ```
806
  when [space v] key pressed
807
- if <((y position)) = (-100)> then
808
- repeat (5)
809
- change y by (100)
810
- wait (0.1) seconds
811
- change y by (-100)
812
- wait (0.1) seconds
813
- end
814
- end
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]: