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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +31 -31
app.py CHANGED
@@ -818,8 +818,8 @@ Each plan must include a **single Scratch Hat Block** (e.g., 'event_whenflagclic
818
  - example 3 [pattern for level up and increase difficulty]:
819
  ```
820
  when I receive [Level Up v]
821
- change [level v] by (1)
822
- set [ballSpeed v] to ((([ballSpeed v]) * (1.1)))
823
  end
824
  ```
825
  5. Use target names exactly as listed in `Targets in Game`. Do NOT rename or invent new targets.
@@ -833,7 +833,7 @@ Each plan must include a **single Scratch Hat Block** (e.g., 'event_whenflagclic
833
  "plans": [
834
  {{
835
  "event": "event_whenflagclicked",
836
- "logic": "when green flag clicked\n switch backdrop to [backdrop1 v]\n set [score v] to 0\n show variable [score v]\n broadcast [Game Start v]",
837
  "motion": [],
838
  "control": [],
839
  "operator": [],
@@ -852,7 +852,7 @@ Each plan must include a **single Scratch Hat Block** (e.g., 'event_whenflagclic
852
  }},
853
  {{
854
  "event": "event_whenbroadcastreceived",
855
- "logic": "when I receive [Game Over v]\n if <(score) > (High Score)> then\n set [High Score v] to (score)\n end\n switch backdrop to [HighScore v]",
856
  "motion": [],
857
  "control": [
858
  "control_if"
@@ -877,7 +877,7 @@ Each plan must include a **single Scratch Hat Block** (e.g., 'event_whenflagclic
877
  "plans": [
878
  {{
879
  "event": "event_whenflagclicked",
880
- "logic": "when green flag clicked\n go to x: 240 y: -100\n end\n.",
881
  "motion": [
882
  "motion_gotoxy"
883
  ],
@@ -891,7 +891,7 @@ Each plan must include a **single Scratch Hat Block** (e.g., 'event_whenflagclic
891
  }},
892
  {{
893
  "event": "event_whenkeypressed",
894
- "logic": "when [space v] key pressed\n repeat (10)\n change y by (20)\n wait (0.1) seconds\n change y by (-20)\n end",
895
  "motion": [
896
  "motion_changeyby"
897
  ],
@@ -913,7 +913,7 @@ Each plan must include a **single Scratch Hat Block** (e.g., 'event_whenflagclic
913
  "plans": [
914
  {{
915
  "event": "event_whenflagclicked",
916
- "logic": "when green flag clicked\n go to x: 240 y: -135\n forever\n glide 2 seconds to x: -240 y: -135\n if <(x position) < -235> then\n set x to 240\n end\n if <touching [Sprite1 v]?> then\n broadcast [Game Over v]\n stop [all v]\n end\n end",
917
  "motion": [
918
  "motion_gotoxy",
919
  "motion_glidesecstoxy",
@@ -1095,35 +1095,35 @@ Use sprite names exactly as provided in `sprite_names` (e.g., 'Sprite1', 'soccer
1095
  - example 1[continues moving objects]:
1096
  ```
1097
  when green flag clicked
1098
- go to x: (240) y: (-100)
1099
- set [speed v] to (-5)
1100
- show variable [speed v]
1101
- forever
1102
- change x by ([speed v])
1103
- if <((x position)) < (-240)> then
1104
- go to x: (240) y: (-100)
1105
- end
1106
- end
1107
  end
1108
  ```
1109
  - example 2[jumping script of an plan]:
1110
  ```
1111
  when [space v] key pressed
1112
- if <((y position)) = (-100)> then
1113
- repeat (5)
1114
- change y by (100)
1115
- wait (0.1) seconds
1116
- change y by (-100)
1117
- wait (0.1) seconds
1118
- end
1119
- end
1120
  end
1121
  ```
1122
  - example 3 [pattern for level up and increase difficulty]:
1123
  ```
1124
  when I receive [Level Up v]
1125
- change [level v] by (1)
1126
- set [ballSpeed v] to ((([ballSpeed v]) * (1.1)))
1127
  end
1128
  ```
1129
  6. Use target names exactly as listed in `Targets in Game`. Do NOT rename or invent new targets.
@@ -1137,7 +1137,7 @@ Use sprite names exactly as provided in `sprite_names` (e.g., 'Sprite1', 'soccer
1137
  "plans": [
1138
  {{
1139
  "event": "event_whenflagclicked",
1140
- "logic": "when green flag clicked\n switch backdrop to [backdrop1 v]\n set [score v] to 0\n show variable [score v]\n broadcast [Game Start v]",
1141
  "motion": [],
1142
  "control": [],
1143
  "operator": [],
@@ -1156,7 +1156,7 @@ Use sprite names exactly as provided in `sprite_names` (e.g., 'Sprite1', 'soccer
1156
  }},
1157
  {{
1158
  "event": "event_whenbroadcastreceived",
1159
- "logic": "when I receive [Game Over v]\n if <(score) > (High Score)> then\n set [High Score v] to (score)\n end\n switch backdrop to [HighScore v]",
1160
  "motion": [],
1161
  "control": [
1162
  "control_if"
@@ -1181,7 +1181,7 @@ Use sprite names exactly as provided in `sprite_names` (e.g., 'Sprite1', 'soccer
1181
  "plans": [
1182
  {{
1183
  "event": "event_whenflagclicked",
1184
- "logic": "when green flag clicked\n go to x: 240 y: -100\n end\n.",
1185
  "motion": [
1186
  "motion_gotoxy"
1187
  ],
@@ -1195,7 +1195,7 @@ Use sprite names exactly as provided in `sprite_names` (e.g., 'Sprite1', 'soccer
1195
  }},
1196
  {{
1197
  "event": "event_whenkeypressed",
1198
- "logic": "when [space v] key pressed\n repeat (10)\n change y by (20)\n wait (0.1) seconds\n change y by (-20)\n end",
1199
  "motion": [
1200
  "motion_changeyby"
1201
  ],
@@ -1217,7 +1217,7 @@ Use sprite names exactly as provided in `sprite_names` (e.g., 'Sprite1', 'soccer
1217
  "plans": [
1218
  {{
1219
  "event": "event_whenflagclicked",
1220
- "logic": "when green flag clicked\n go to x: 240 y: -135\n forever\n glide 2 seconds to x: -240 y: -135\n if <(x position) < -235> then\n set x to 240\n end\n if <touching [Sprite1 v]?> then\n broadcast [Game Over v]\n stop [all v]\n end\n end",
1221
  "motion": [
1222
  "motion_gotoxy",
1223
  "motion_glidesecstoxy",
 
818
  - example 3 [pattern for level up and increase difficulty]:
819
  ```
820
  when I receive [Level Up v]
821
+ change [level v] by (1)
822
+ set [ballSpeed v] to ((([ballSpeed v]) * (1.1)))
823
  end
824
  ```
825
  5. Use target names exactly as listed in `Targets in Game`. Do NOT rename or invent new targets.
 
833
  "plans": [
834
  {{
835
  "event": "event_whenflagclicked",
836
+ "logic": "when green flag clicked\n switch backdrop to [backdrop1 v]\n set [score v] to 0\n show variable [score v]\n broadcast [Game Start v]\nend",
837
  "motion": [],
838
  "control": [],
839
  "operator": [],
 
852
  }},
853
  {{
854
  "event": "event_whenbroadcastreceived",
855
+ "logic": "when I receive [Game Over v]\n if <(score) > (High Score)> then\n set [High Score v] to (score)\n end\n switch backdrop to [HighScore v]\nend",
856
  "motion": [],
857
  "control": [
858
  "control_if"
 
877
  "plans": [
878
  {{
879
  "event": "event_whenflagclicked",
880
+ "logic": "when green flag clicked\n go to x: 240 y: -100\nend",
881
  "motion": [
882
  "motion_gotoxy"
883
  ],
 
891
  }},
892
  {{
893
  "event": "event_whenkeypressed",
894
+ "logic": "when [space v] key pressed\n repeat (10)\n change y by (20)\n wait (0.1) seconds\n change y by (-20)\n end\nend",
895
  "motion": [
896
  "motion_changeyby"
897
  ],
 
913
  "plans": [
914
  {{
915
  "event": "event_whenflagclicked",
916
+ "logic": "when green flag clicked\n go to x: 240 y: -135\n forever\n glide 2 seconds to x: -240 y: -135\n if <(x position) < -235> then\n set x to 240\n end\n if <touching [Sprite1 v]?> then\n broadcast [Game Over v]\n stop [all v]\n end\n end\nend",
917
  "motion": [
918
  "motion_gotoxy",
919
  "motion_glidesecstoxy",
 
1095
  - example 1[continues moving objects]:
1096
  ```
1097
  when green flag clicked
1098
+ go to x: (240) y: (-100)
1099
+ set [speed v] to (-5)
1100
+ show variable [speed v]
1101
+ forever
1102
+ change x by ([speed v])
1103
+ if <((x position)) < (-240)> then
1104
+ go to x: (240) y: (-100)
1105
+ end
1106
+ end
1107
  end
1108
  ```
1109
  - example 2[jumping script of an plan]:
1110
  ```
1111
  when [space v] key pressed
1112
+ if <((y position)) = (-100)> then
1113
+ repeat (5)
1114
+ change y by (100)
1115
+ wait (0.1) seconds
1116
+ change y by (-100)
1117
+ wait (0.1) seconds
1118
+ end
1119
+ end
1120
  end
1121
  ```
1122
  - example 3 [pattern for level up and increase difficulty]:
1123
  ```
1124
  when I receive [Level Up v]
1125
+ change [level v] by (1)
1126
+ set [ballSpeed v] to ((([ballSpeed v]) * (1.1)))
1127
  end
1128
  ```
1129
  6. Use target names exactly as listed in `Targets in Game`. Do NOT rename or invent new targets.
 
1137
  "plans": [
1138
  {{
1139
  "event": "event_whenflagclicked",
1140
+ "logic": "when green flag clicked\n switch backdrop to [backdrop1 v]\n set [score v] to 0\n show variable [score v]\n broadcast [Game Start v]\nend",
1141
  "motion": [],
1142
  "control": [],
1143
  "operator": [],
 
1156
  }},
1157
  {{
1158
  "event": "event_whenbroadcastreceived",
1159
+ "logic": "when I receive [Game Over v]\n if <(score) > (High Score)> then\n set [High Score v] to (score)\n end\n switch backdrop to [HighScore v]\nend",
1160
  "motion": [],
1161
  "control": [
1162
  "control_if"
 
1181
  "plans": [
1182
  {{
1183
  "event": "event_whenflagclicked",
1184
+ "logic": "when green flag clicked\n go to x: 240 y: -100\nend\n",
1185
  "motion": [
1186
  "motion_gotoxy"
1187
  ],
 
1195
  }},
1196
  {{
1197
  "event": "event_whenkeypressed",
1198
+ "logic": "when [space v] key pressed\n repeat (10)\n change y by (20)\n wait (0.1) seconds\n change y by (-20)\n end\nend",
1199
  "motion": [
1200
  "motion_changeyby"
1201
  ],
 
1217
  "plans": [
1218
  {{
1219
  "event": "event_whenflagclicked",
1220
+ "logic": "when green flag clicked\n go to x: 240 y: -135\n forever\n glide 2 seconds to x: -240 y: -135\n if <(x position) < -235> then\n set x to 240\n end\n if <touching [Sprite1 v]?> then\n broadcast [Game Over v]\n stop [all v]\n end\n end\nend",
1221
  "motion": [
1222
  "motion_gotoxy",
1223
  "motion_glidesecstoxy",