@robotical/martyblocksjr 4.2.6 → 4.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/editions/free/src/app.bundle.js +1 -1
  2. package/editions/free/src/localizations/bg.json +1 -1
  3. package/editions/free/src/localizations/ca.json +1 -1
  4. package/editions/free/src/localizations/cs.json +1 -1
  5. package/editions/free/src/localizations/cy.json +1 -1
  6. package/editions/free/src/localizations/da.json +1 -1
  7. package/editions/free/src/localizations/de.json +1 -1
  8. package/editions/free/src/localizations/el.json +1 -1
  9. package/editions/free/src/localizations/en.json +1 -1
  10. package/editions/free/src/localizations/es.json +1 -1
  11. package/editions/free/src/localizations/fi.json +1 -1
  12. package/editions/free/src/localizations/fr.json +1 -1
  13. package/editions/free/src/localizations/it.json +1 -1
  14. package/editions/free/src/localizations/ja.json +1 -1
  15. package/editions/free/src/localizations/ko.json +1 -1
  16. package/editions/free/src/localizations/nl.json +1 -1
  17. package/editions/free/src/localizations/no.json +1 -1
  18. package/editions/free/src/localizations/pl.json +1 -1
  19. package/editions/free/src/localizations/pt-br.json +1 -1
  20. package/editions/free/src/localizations/pt.json +1 -1
  21. package/editions/free/src/localizations/sv.json +1 -1
  22. package/editions/free/src/localizations/th.json +1 -1
  23. package/editions/free/src/localizations/tr.json +1 -1
  24. package/editions/free/src/localizations/uk.json +1 -1
  25. package/editions/free/src/localizations/zh-cn.json +1 -1
  26. package/editions/free/src/localizations/zh-tw.json +1 -1
  27. package/package.json +1 -1
  28. package/tests/GoToLink.test.js +48 -0
  29. package/tests/tutorial/CogAndMartyTutorial.test.js +42 -0
  30. package/tutorial.ts +18 -130
package/tutorial.ts CHANGED
@@ -33,7 +33,7 @@ type TutorialStep = {
33
33
  instructionActions: Action[];
34
34
  hintActions?: Action[];
35
35
  buttons: ("previous" | "next" | "hint")[];
36
- expectedCode: string[]; // e.g: ["onmessage=>martyDance"] each element of the array corresponds to a script. each script is a series of blocks connected with =>
36
+ expectedCode: string[]; // e.g: ["ontouchcog=>martyDance"] each element of the array corresponds to a script. each script is a series of blocks connected with =>
37
37
  presenter: "marty"; // or any other sprite
38
38
  };
39
39
 
@@ -112,7 +112,7 @@ const cogAndMartyTutorial: Tutorial = {
112
112
  expectedCode: [],
113
113
  presenter: "marty"
114
114
  },
115
- /* STEP 2 -- go to cog event blocks */
115
+ /* STEP 2 -- enter Marty mode and go to Cog event blocks */
116
116
  {
117
117
  instructionActions: [
118
118
  {
@@ -121,6 +121,9 @@ const cogAndMartyTutorial: Tutorial = {
121
121
  }
122
122
  ],
123
123
  nextStepActions: [
124
+ {
125
+ type: "ShowMartyMode",
126
+ },
124
127
  {
125
128
  type: "HighlightElement",
126
129
  elementId: "cog-start",
@@ -130,10 +133,10 @@ const cogAndMartyTutorial: Tutorial = {
130
133
  ],
131
134
  hintActions: [],
132
135
  buttons: ["previous", "next"],
133
- expectedCode: ["ontouchcog_block", "message_block"],
136
+ expectedCode: [],
134
137
  presenter: "marty"
135
138
  },
136
- /* STEP 3 -- add ontouchcog block */
139
+ /* STEP 3 -- add ontouchcog block to Marty's script */
137
140
  {
138
141
  instructionActions: [
139
142
  {
@@ -143,15 +146,8 @@ const cogAndMartyTutorial: Tutorial = {
143
146
  ],
144
147
  nextStepActions: [
145
148
  {
146
- type: "ShowCategory",
147
- category: "cog-start"
148
- },
149
- {
150
- type: "HighlightBlocks",
151
- blocks: ["ontouchcog_block"]
149
+ type: "ShowMartyMode",
152
150
  },
153
- ],
154
- hintActions: [
155
151
  {
156
152
  type: "ShowCategory",
157
153
  category: "cog-start"
@@ -160,114 +156,6 @@ const cogAndMartyTutorial: Tutorial = {
160
156
  type: "HighlightBlocks",
161
157
  blocks: ["ontouchcog_block"]
162
158
  },
163
- {
164
- type: "DragBlockToScriptArea",
165
- block: "ontouchcog_block",
166
- }
167
- ],
168
- buttons: ["previous", "next", "hint"],
169
- expectedCode: ["ontouchcog"],
170
- presenter: "marty"
171
- },
172
- /* STEP 4 -- go to sprite event blocks */
173
- {
174
- instructionActions: [
175
- {
176
- type: "ShowInstructorText",
177
- text: "Great! Now let's move to the Sprite blocks, which are on the left side of the screen."
178
- }
179
- ],
180
- nextStepActions: [
181
- {
182
- type: "HighlightElement",
183
- elementId: "sprite-start",
184
- hexColor: "#855cd659",
185
- onClickAction: "NextStep"
186
- },
187
- ],
188
- hintActions: [],
189
- buttons: ["previous", "next"],
190
- expectedCode: [],
191
- presenter: "marty"
192
- },
193
- /* STEP 5 -- add message block after the ontouchcog block */
194
- {
195
- instructionActions: [
196
- {
197
- type: "ShowInstructorText",
198
- text: "Now drag the 'message' block from the Sprite Start category to the script area. This block will send a message to Marty when the sprite is clicked"
199
- }
200
- ],
201
- nextStepActions: [
202
- {
203
- type: "ShowCategory",
204
- category: "sprite-start"
205
- },
206
- {
207
- type: "HighlightBlocks",
208
- blocks: ["message_block"]
209
- },
210
- ],
211
- hintActions: [
212
- {
213
- type: "ShowCategory",
214
- category: "sprite-start"
215
- },
216
- {
217
- type: "HighlightBlocks",
218
- blocks: ["message_block"]
219
- },
220
- {
221
- type: "DragBlockToScriptArea",
222
- block: "message_block",
223
- }
224
- ],
225
- buttons: ["previous", "next", "hint"],
226
- expectedCode: ["ontouchcog=>message"],
227
- presenter: "marty"
228
- },
229
- /* STEP 6 -- go to marty mode */
230
- {
231
- instructionActions: [
232
- {
233
- type: "ShowInstructorText",
234
- text: "Now let's move to Marty. We need to enable Marty Mode to see the Marty blocks. Click on the Marty Mode button."
235
- }
236
- ],
237
- nextStepActions: [
238
- {
239
- type: "HighlightElement",
240
- elementId: "martyMode",
241
- hexColor: "#855cd659",
242
- onClickAction: "NextStep"
243
- }
244
- ],
245
- hintActions: [
246
- ],
247
- buttons: ["previous", "next"],
248
- expectedCode: [],
249
- presenter: "marty"
250
- },
251
- /* STEP 7 -- add onmessage block */
252
- {
253
- instructionActions: [
254
- {
255
- type: "ShowInstructorText",
256
- text: "Once in Marty Mode, drag the 'on message' block from the Marty Start category to the script area. This block will listen for the message sent by Cog"
257
- }
258
- ],
259
- nextStepActions: [
260
- {
261
- type: "ShowMartyMode",
262
- },
263
- {
264
- type: "ShowCategory",
265
- category: "marty-start"
266
- },
267
- {
268
- type: "HighlightBlocks",
269
- blocks: ["onmessage_block"]
270
- }
271
159
  ],
272
160
  hintActions: [
273
161
  {
@@ -275,22 +163,22 @@ const cogAndMartyTutorial: Tutorial = {
275
163
  },
276
164
  {
277
165
  type: "ShowCategory",
278
- category: "marty-start"
166
+ category: "cog-start"
279
167
  },
280
168
  {
281
169
  type: "HighlightBlocks",
282
- blocks: ["onmessage_block"]
170
+ blocks: ["ontouchcog_block"]
283
171
  },
284
172
  {
285
173
  type: "DragBlockToScriptArea",
286
- block: "onmessage_block",
174
+ block: "ontouchcog_block",
287
175
  }
288
176
  ],
289
177
  buttons: ["previous", "next", "hint"],
290
- expectedCode: ["onmessage"],
178
+ expectedCode: ["ontouchcog"],
291
179
  presenter: "marty"
292
180
  },
293
- /* STEP 8 -- go to marty motion blocks */
181
+ /* STEP 4 -- go to marty motion blocks */
294
182
  {
295
183
  instructionActions: [
296
184
  {
@@ -316,12 +204,12 @@ const cogAndMartyTutorial: Tutorial = {
316
204
  expectedCode: [],
317
205
  presenter: "marty"
318
206
  },
319
- /* STEP 9 -- add marty dance block */
207
+ /* STEP 5 -- add marty dance block after the Cog trigger */
320
208
  {
321
209
  instructionActions: [
322
210
  {
323
211
  type: "ShowInstructorText",
324
- text: "We're almost there! Drag the 'marty dance' block to the script area. This block will make Marty dance when the message is received"
212
+ text: "We're almost there! Drag the 'Marty Dance' block beneath the 'on touch cog' block. Marty will dance when Cog's button is pressed."
325
213
  }
326
214
  ],
327
215
  nextStepActions: [
@@ -355,15 +243,15 @@ const cogAndMartyTutorial: Tutorial = {
355
243
  }
356
244
  ],
357
245
  buttons: ["previous", "next", "hint"],
358
- expectedCode: ["onmessage=>martyDance"],
246
+ expectedCode: ["ontouchcog=>martyDance"],
359
247
  presenter: "marty"
360
248
  },
361
- /* STEP 10 -- end */
249
+ /* STEP 6 -- end */
362
250
  {
363
251
  instructionActions: [
364
252
  {
365
253
  type: "ShowInstructorText",
366
- text: "Great job! You have successfully coded Cog and Marty to interact with each other. No click Cog's button to see Marty dance!"
254
+ text: "Great job! You have successfully coded Cog and Marty to interact with each other. Now click Cog's button to see Marty dance!"
367
255
  }
368
256
  ],
369
257
  nextStepActions: [],