@robotical/martyblocksjr 4.2.6 → 4.2.8
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.
- package/editions/free/src/app.bundle.js +1 -1
- package/editions/free/src/assets/start/marty-blocksjr.svg +1 -0
- package/editions/free/src/inapp/about.html +1 -1
- package/editions/free/src/localizations/bg.json +2 -2
- package/editions/free/src/localizations/ca.json +2 -2
- package/editions/free/src/localizations/cs.json +2 -2
- package/editions/free/src/localizations/cy.json +2 -2
- package/editions/free/src/localizations/da.json +2 -2
- package/editions/free/src/localizations/de.json +2 -2
- package/editions/free/src/localizations/el.json +2 -2
- package/editions/free/src/localizations/en.json +2 -2
- package/editions/free/src/localizations/es.json +2 -2
- package/editions/free/src/localizations/fi.json +2 -2
- package/editions/free/src/localizations/fr.json +2 -2
- package/editions/free/src/localizations/it.json +2 -2
- package/editions/free/src/localizations/ja.json +2 -2
- package/editions/free/src/localizations/ko.json +2 -2
- package/editions/free/src/localizations/nl.json +2 -2
- package/editions/free/src/localizations/no.json +2 -2
- package/editions/free/src/localizations/pl.json +2 -2
- package/editions/free/src/localizations/pt-br.json +2 -2
- package/editions/free/src/localizations/pt.json +2 -2
- package/editions/free/src/localizations/sv.json +2 -2
- package/editions/free/src/localizations/th.json +2 -2
- package/editions/free/src/localizations/tr.json +2 -2
- package/editions/free/src/localizations/uk.json +2 -2
- package/editions/free/src/localizations/zh-cn.json +2 -2
- package/editions/free/src/localizations/zh-tw.json +2 -2
- package/package.json +1 -1
- package/tests/GoToLink.test.js +48 -0
- package/tests/tutorial/CogAndMartyTutorial.test.js +42 -0
- package/tutorial.ts +18 -130
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"SAMPLE_PROJECTS": "Progetti di Esempio",
|
|
5
5
|
"ABOUT_SCRATCHJR": "Info su Blocks Jr",
|
|
6
6
|
"ABOUT_BLOCKS_JR_EYEBROW": "Made for curious creators",
|
|
7
|
-
"ABOUT_BLOCKS_JR_TAGLINE": "Create stories. Code characters. Bring
|
|
7
|
+
"ABOUT_BLOCKS_JR_TAGLINE": "Create stories. Code characters. Bring learning to life.",
|
|
8
8
|
"ABOUT_BLOCKS_JR_INTRODUCTION_TITLE": "A first step into creative coding",
|
|
9
9
|
"ABOUT_BLOCKS_JR_INTRODUCTION_DESCRIPTION": "Blocks Jr is Robotical's beginner-friendly block coding environment. Young learners snap together colourful blocks to make characters move, tell interactive stories, and control real robots—building confidence through play and experimentation.",
|
|
10
10
|
"ABOUT_BLOCKS_JR_FEATURES_TITLE": "What can you make?",
|
|
@@ -599,7 +599,7 @@
|
|
|
599
599
|
"COG_AND_MARTY_TUTORIAL_MARTY_MODE": "Ora passiamo a Marty. Dobbiamo abilitare la Modalità Marty per vedere i blocchi di Marty. Clicca sul pulsante Modalità Marty.",
|
|
600
600
|
"COG_AND_MARTY_TUTORIAL_ONMESSAGE_BLOCK": "Una volta in modalità Marty, trascina il blocco \"su messaggio\" dalla categoria Marty Start all'area script. Questo blocco ascolterà il messaggio inviato da Cog.",
|
|
601
601
|
"COG_AND_MARTY_TUTORIAL_MARTY_MOTION_BLOCKS": "Ora selezioniamo i blocchi di movimento di Marty. Fai clic sulla categoria Movimento dei blocchi di Marty.",
|
|
602
|
-
"COG_AND_MARTY_TUTORIAL_MARTY_DANCE_BLOCK": "Ci siamo quasi! Trascina il blocco \"Marty Dance\"
|
|
602
|
+
"COG_AND_MARTY_TUTORIAL_MARTY_DANCE_BLOCK": "Ci siamo quasi! Trascina il blocco \"Marty Dance\" sotto il blocco \"on touch cog\". Marty ballerà quando verrà premuto il pulsante di Cog.",
|
|
603
603
|
"COG_AND_MARTY_TUTORIAL_END": "Ottimo lavoro! Hai programmato con successo Cog e Marty per interagire tra loro. Ora clicca sul pulsante di Cog per vedere Marty ballare!",
|
|
604
604
|
"COG_JRBLOCKS1_TITLE": "1. Crea una melodia",
|
|
605
605
|
"COG_JRBLOCKS1_STEP_1_TEXT": "Facciamo suonare una melodia a Cog!",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"SAMPLE_PROJECTS": "ぷろじぇくとのれい",
|
|
5
5
|
"ABOUT_SCRATCHJR": "Blocks Jrについて",
|
|
6
6
|
"ABOUT_BLOCKS_JR_EYEBROW": "Made for curious creators",
|
|
7
|
-
"ABOUT_BLOCKS_JR_TAGLINE": "Create stories. Code characters. Bring
|
|
7
|
+
"ABOUT_BLOCKS_JR_TAGLINE": "Create stories. Code characters. Bring learning to life.",
|
|
8
8
|
"ABOUT_BLOCKS_JR_INTRODUCTION_TITLE": "A first step into creative coding",
|
|
9
9
|
"ABOUT_BLOCKS_JR_INTRODUCTION_DESCRIPTION": "Blocks Jr is Robotical's beginner-friendly block coding environment. Young learners snap together colourful blocks to make characters move, tell interactive stories, and control real robots—building confidence through play and experimentation.",
|
|
10
10
|
"ABOUT_BLOCKS_JR_FEATURES_TITLE": "What can you make?",
|
|
@@ -599,7 +599,7 @@
|
|
|
599
599
|
"COG_AND_MARTY_TUTORIAL_MARTY_MODE": "では、Marty に移りましょう。Marty ブロックを表示するには、Marty モードを有効にする必要があります。Marty モードボタンをクリックしてください。",
|
|
600
600
|
"COG_AND_MARTY_TUTORIAL_ONMESSAGE_BLOCK": "Martyモードになったら、「Marty Start」カテゴリから「on message」ブロックをスクリプトエリアにドラッグします。このブロックはCogから送信されるメッセージをリッスンします。",
|
|
601
601
|
"COG_AND_MARTY_TUTORIAL_MARTY_MOTION_BLOCKS": "では、Martyのモーションブロックを選択しましょう。Martyブロックの「モーション」カテゴリをクリックします。",
|
|
602
|
-
"COG_AND_MARTY_TUTORIAL_MARTY_DANCE_BLOCK": "もうすぐです!「Marty Dance
|
|
602
|
+
"COG_AND_MARTY_TUTORIAL_MARTY_DANCE_BLOCK": "もうすぐです!「Marty Dance」ブロックを「on touch cog」ブロックの下につなげてください。Cog のボタンを押すと Marty が踊ります。",
|
|
603
603
|
"COG_AND_MARTY_TUTORIAL_END": "よくできました!CogとMartyが相互にやり取りするコードが完成しました。CogのボタンをクリックしてMartyのダンスを見てみましょう!",
|
|
604
604
|
"COG_JRBLOCKS1_TITLE": "1. 曲を作る",
|
|
605
605
|
"COG_JRBLOCKS1_STEP_1_TEXT": "Cog に曲を演奏させましょう!",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"SAMPLE_PROJECTS": "예시 프로젝트",
|
|
5
5
|
"ABOUT_SCRATCHJR": "Blocks Jr 소개",
|
|
6
6
|
"ABOUT_BLOCKS_JR_EYEBROW": "Made for curious creators",
|
|
7
|
-
"ABOUT_BLOCKS_JR_TAGLINE": "Create stories. Code characters. Bring
|
|
7
|
+
"ABOUT_BLOCKS_JR_TAGLINE": "Create stories. Code characters. Bring learning to life.",
|
|
8
8
|
"ABOUT_BLOCKS_JR_INTRODUCTION_TITLE": "A first step into creative coding",
|
|
9
9
|
"ABOUT_BLOCKS_JR_INTRODUCTION_DESCRIPTION": "Blocks Jr is Robotical's beginner-friendly block coding environment. Young learners snap together colourful blocks to make characters move, tell interactive stories, and control real robots—building confidence through play and experimentation.",
|
|
10
10
|
"ABOUT_BLOCKS_JR_FEATURES_TITLE": "What can you make?",
|
|
@@ -599,7 +599,7 @@
|
|
|
599
599
|
"COG_AND_MARTY_TUTORIAL_MARTY_MODE": "이제 Marty로 넘어가 볼까요? Marty 블록을 보려면 Marty Mode를 활성화해야 합니다. Marty Mode 버튼을 클릭하세요.",
|
|
600
600
|
"COG_AND_MARTY_TUTORIAL_ONMESSAGE_BLOCK": "Marty Mode에 진입하면 Marty Start 카테고리에서 '메시지 수신' 블록을 스크립트 영역으로 드래그하세요. 이 블록은 Cog에서 전송된 메시지를 수신합니다.",
|
|
601
601
|
"COG_AND_MARTY_TUTORIAL_MARTY_MOTION_BLOCKS": "이제 Marty의 동작 블록을 선택해 보겠습니다. Marty 블록의 동작 카테고리를 클릭하세요.",
|
|
602
|
-
"COG_AND_MARTY_TUTORIAL_MARTY_DANCE_BLOCK": "거의 다 왔어요! '마티 댄스' 블록을
|
|
602
|
+
"COG_AND_MARTY_TUTORIAL_MARTY_DANCE_BLOCK": "거의 다 왔어요! '마티 댄스' 블록을 'on touch cog' 블록 아래에 연결하세요. Cog의 버튼을 누르면 마티가 춤을 춥니다.",
|
|
603
603
|
"COG_AND_MARTY_TUTORIAL_END": "잘했어요! Cog와 Marty가 서로 소통하도록 코딩이 완료되었습니다. 이제 Cog의 버튼을 클릭하여 Marty가 춤추는 모습을 감상해 보세요!",
|
|
604
604
|
"COG_JRBLOCKS1_TITLE": "1. 곡을 만들어 보세요",
|
|
605
605
|
"COG_JRBLOCKS1_STEP_1_TEXT": "코그에게 곡을 연주하게 해 보자!",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"SAMPLE_PROJECTS": "Voorbeeldprojecten",
|
|
5
5
|
"ABOUT_SCRATCHJR": "Over Blocks Jr",
|
|
6
6
|
"ABOUT_BLOCKS_JR_EYEBROW": "Made for curious creators",
|
|
7
|
-
"ABOUT_BLOCKS_JR_TAGLINE": "Create stories. Code characters. Bring
|
|
7
|
+
"ABOUT_BLOCKS_JR_TAGLINE": "Create stories. Code characters. Bring learning to life.",
|
|
8
8
|
"ABOUT_BLOCKS_JR_INTRODUCTION_TITLE": "A first step into creative coding",
|
|
9
9
|
"ABOUT_BLOCKS_JR_INTRODUCTION_DESCRIPTION": "Blocks Jr is Robotical's beginner-friendly block coding environment. Young learners snap together colourful blocks to make characters move, tell interactive stories, and control real robots—building confidence through play and experimentation.",
|
|
10
10
|
"ABOUT_BLOCKS_JR_FEATURES_TITLE": "What can you make?",
|
|
@@ -599,7 +599,7 @@
|
|
|
599
599
|
"COG_AND_MARTY_TUTORIAL_MARTY_MODE": "Laten we nu naar Marty gaan. We moeten de Marty-modus inschakelen om de Marty-blokken te zien. Klik op de Marty-modusknop.",
|
|
600
600
|
"COG_AND_MARTY_TUTORIAL_ONMESSAGE_BLOCK": "In de Marty-modus sleep je het blok 'op bericht' van de categorie Marty Start naar het scriptgebied. Dit blok luistert naar het bericht dat door Cog is verzonden.",
|
|
601
601
|
"COG_AND_MARTY_TUTORIAL_MARTY_MOTION_BLOCKS": "Laten we nu Marty's bewegingsblokken selecteren. Klik op de categorie Beweging van Marty-blokken.",
|
|
602
|
-
"COG_AND_MARTY_TUTORIAL_MARTY_DANCE_BLOCK": "We zijn er bijna! Sleep het blok 'Marty Dance'
|
|
602
|
+
"COG_AND_MARTY_TUTORIAL_MARTY_DANCE_BLOCK": "We zijn er bijna! Sleep het blok 'Marty Dance' onder het blok 'on touch cog'. Marty danst wanneer de knop van Cog wordt ingedrukt.",
|
|
603
603
|
"COG_AND_MARTY_TUTORIAL_END": "Goed gedaan! Je hebt Cog en Marty succesvol geprogrammeerd om met elkaar te communiceren. Klik nu op Cogs knop om Marty te zien dansen!",
|
|
604
604
|
"COG_JRBLOCKS1_TITLE": "1. Maak een melodie",
|
|
605
605
|
"COG_JRBLOCKS1_STEP_1_TEXT": "Laten we Cog een liedje laten spelen!",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"SAMPLE_PROJECTS": "Prosjekt Prøver",
|
|
5
5
|
"ABOUT_SCRATCHJR": "Om Blocks Jr",
|
|
6
6
|
"ABOUT_BLOCKS_JR_EYEBROW": "Made for curious creators",
|
|
7
|
-
"ABOUT_BLOCKS_JR_TAGLINE": "Create stories. Code characters. Bring
|
|
7
|
+
"ABOUT_BLOCKS_JR_TAGLINE": "Create stories. Code characters. Bring learning to life.",
|
|
8
8
|
"ABOUT_BLOCKS_JR_INTRODUCTION_TITLE": "A first step into creative coding",
|
|
9
9
|
"ABOUT_BLOCKS_JR_INTRODUCTION_DESCRIPTION": "Blocks Jr is Robotical's beginner-friendly block coding environment. Young learners snap together colourful blocks to make characters move, tell interactive stories, and control real robots—building confidence through play and experimentation.",
|
|
10
10
|
"ABOUT_BLOCKS_JR_FEATURES_TITLE": "What can you make?",
|
|
@@ -599,7 +599,7 @@
|
|
|
599
599
|
"COG_AND_MARTY_TUTORIAL_MARTY_MODE": "La oss nå flytte til Marty. Vi må aktivere Marty Mode for å se Marty-blokkene. Klikk på Marty Mode-knappen.",
|
|
600
600
|
"COG_AND_MARTY_TUTORIAL_ONMESSAGE_BLOCK": "Når du er i Marty-modus, drar du \"on message\"-blokken fra Marty Start-kategorien til skriptområdet. Denne blokken vil lytte etter meldingen sendt av Cog.",
|
|
601
601
|
"COG_AND_MARTY_TUTORIAL_MARTY_MOTION_BLOCKS": "La oss nå velge Martys bevegelsesblokker. Klikk på bevegelseskategorien til Marty-blokker.",
|
|
602
|
-
"COG_AND_MARTY_TUTORIAL_MARTY_DANCE_BLOCK": "Vi er nesten der! Dra 'Marty Dance'-blokken
|
|
602
|
+
"COG_AND_MARTY_TUTORIAL_MARTY_DANCE_BLOCK": "Vi er nesten der! Dra 'Marty Dance'-blokken under 'on touch cog'-blokken. Marty danser når du trykker på knappen på Cog.",
|
|
603
603
|
"COG_AND_MARTY_TUTORIAL_END": "Flott jobb! Du har kodet Cog og Marty til å samhandle med hverandre. Klikk nå på Cogs-knappen for å se Marty danse!",
|
|
604
604
|
"COG_JRBLOCKS1_TITLE": "1. Lag en melodi",
|
|
605
605
|
"COG_JRBLOCKS1_STEP_1_TEXT": "La oss få Cog til å spille en melodi!",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"SAMPLE_PROJECTS": "Przykładowe Projekty",
|
|
5
5
|
"ABOUT_SCRATCHJR": "O Blocks Jr",
|
|
6
6
|
"ABOUT_BLOCKS_JR_EYEBROW": "Made for curious creators",
|
|
7
|
-
"ABOUT_BLOCKS_JR_TAGLINE": "Create stories. Code characters. Bring
|
|
7
|
+
"ABOUT_BLOCKS_JR_TAGLINE": "Create stories. Code characters. Bring learning to life.",
|
|
8
8
|
"ABOUT_BLOCKS_JR_INTRODUCTION_TITLE": "A first step into creative coding",
|
|
9
9
|
"ABOUT_BLOCKS_JR_INTRODUCTION_DESCRIPTION": "Blocks Jr is Robotical's beginner-friendly block coding environment. Young learners snap together colourful blocks to make characters move, tell interactive stories, and control real robots—building confidence through play and experimentation.",
|
|
10
10
|
"ABOUT_BLOCKS_JR_FEATURES_TITLE": "What can you make?",
|
|
@@ -599,7 +599,7 @@
|
|
|
599
599
|
"COG_AND_MARTY_TUTORIAL_MARTY_MODE": "Teraz przejdźmy do Marty'ego. Musimy włączyć tryb Marty'ego, aby zobaczyć bloki Marty'ego. Kliknij przycisk Marty Mode.",
|
|
600
600
|
"COG_AND_MARTY_TUTORIAL_ONMESSAGE_BLOCK": "W trybie Marty'ego przeciągnij blok 'on message' z kategorii Marty Start do obszaru skryptu. Ten blok będzie nasłuchiwał wiadomości wysyłanej przez Cog.",
|
|
601
601
|
"COG_AND_MARTY_TUTORIAL_MARTY_MOTION_BLOCKS": "Teraz wybierzmy bloki ruchu Marty'ego. Kliknij kategorię Ruch bloków Marty'ego.",
|
|
602
|
-
"COG_AND_MARTY_TUTORIAL_MARTY_DANCE_BLOCK": "Już prawie skończyliśmy! Przeciągnij blok „Marty Dance”
|
|
602
|
+
"COG_AND_MARTY_TUTORIAL_MARTY_DANCE_BLOCK": "Już prawie skończyliśmy! Przeciągnij blok „Marty Dance” pod blok „on touch cog”. Marty zatańczy po naciśnięciu przycisku na Cogu.",
|
|
603
603
|
"COG_AND_MARTY_TUTORIAL_END": "Świetna robota! Udało Ci się zakodować Cog i Marty, aby ze sobą wchodzili w interakcje. Teraz kliknij przycisk Cog, aby zobaczyć taniec Marty'ego!",
|
|
604
604
|
"COG_JRBLOCKS1_TITLE": "1. Stwórz melodię",
|
|
605
605
|
"COG_JRBLOCKS1_STEP_1_TEXT": "Niech Cog zagra melodię!",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"SAMPLE_PROJECTS": "Projetos de Exemplo",
|
|
5
5
|
"ABOUT_SCRATCHJR": "Sobre o Blocks Jr",
|
|
6
6
|
"ABOUT_BLOCKS_JR_EYEBROW": "Made for curious creators",
|
|
7
|
-
"ABOUT_BLOCKS_JR_TAGLINE": "Create stories. Code characters. Bring
|
|
7
|
+
"ABOUT_BLOCKS_JR_TAGLINE": "Create stories. Code characters. Bring learning to life.",
|
|
8
8
|
"ABOUT_BLOCKS_JR_INTRODUCTION_TITLE": "A first step into creative coding",
|
|
9
9
|
"ABOUT_BLOCKS_JR_INTRODUCTION_DESCRIPTION": "Blocks Jr is Robotical's beginner-friendly block coding environment. Young learners snap together colourful blocks to make characters move, tell interactive stories, and control real robots—building confidence through play and experimentation.",
|
|
10
10
|
"ABOUT_BLOCKS_JR_FEATURES_TITLE": "What can you make?",
|
|
@@ -599,7 +599,7 @@
|
|
|
599
599
|
"COG_AND_MARTY_TUTORIAL_MARTY_MODE": "Agora vamos para o Marty. Precisamos ativar o Modo Marty para ver os blocos do Marty. Clique no botão Modo Marty.",
|
|
600
600
|
"COG_AND_MARTY_TUTORIAL_ONMESSAGE_BLOCK": "No Modo Marty, arraste o bloco \"on message\" da categoria \"Marty Start\" para a área de script. Este bloco escutará a mensagem enviada pelo Cog.",
|
|
601
601
|
"COG_AND_MARTY_TUTORIAL_MARTY_MOTION_BLOCKS": "Agora, vamos selecionar os blocos de movimento do Marty. Clique na categoria Movimento dos blocos do Marty.",
|
|
602
|
-
"COG_AND_MARTY_TUTORIAL_MARTY_DANCE_BLOCK": "Estamos quase lá! Arraste o bloco \"Marty Dance\" para
|
|
602
|
+
"COG_AND_MARTY_TUTORIAL_MARTY_DANCE_BLOCK": "Estamos quase lá! Arraste o bloco \"Marty Dance\" para baixo do bloco \"on touch cog\". Marty dançará quando o botão do Cog for pressionado.",
|
|
603
603
|
"COG_AND_MARTY_TUTORIAL_END": "Ótimo trabalho! Você codificou o Cog e o Marty para interagirem um com o outro. Agora clique no botão do Cog para ver o Marty dançar!",
|
|
604
604
|
"COG_JRBLOCKS1_TITLE": "1. Faça uma melodia",
|
|
605
605
|
"COG_JRBLOCKS1_STEP_1_TEXT": "Vamos fazer o Cog tocar uma música!",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"SAMPLE_PROJECTS": "Projetos de Exemplo",
|
|
5
5
|
"ABOUT_SCRATCHJR": "Sobre o Blocks Jr",
|
|
6
6
|
"ABOUT_BLOCKS_JR_EYEBROW": "Made for curious creators",
|
|
7
|
-
"ABOUT_BLOCKS_JR_TAGLINE": "Create stories. Code characters. Bring
|
|
7
|
+
"ABOUT_BLOCKS_JR_TAGLINE": "Create stories. Code characters. Bring learning to life.",
|
|
8
8
|
"ABOUT_BLOCKS_JR_INTRODUCTION_TITLE": "A first step into creative coding",
|
|
9
9
|
"ABOUT_BLOCKS_JR_INTRODUCTION_DESCRIPTION": "Blocks Jr is Robotical's beginner-friendly block coding environment. Young learners snap together colourful blocks to make characters move, tell interactive stories, and control real robots—building confidence through play and experimentation.",
|
|
10
10
|
"ABOUT_BLOCKS_JR_FEATURES_TITLE": "What can you make?",
|
|
@@ -599,7 +599,7 @@
|
|
|
599
599
|
"COG_AND_MARTY_TUTORIAL_MARTY_MODE": "Agora vamos para o Marty. Precisamos ativar o Modo Marty para ver os blocos do Marty. Clique no botão Modo Marty.",
|
|
600
600
|
"COG_AND_MARTY_TUTORIAL_ONMESSAGE_BLOCK": "No Modo Marty, arraste o bloco \"on message\" da categoria \"Marty Start\" para a área de script. Este bloco escutará a mensagem enviada pelo Cog.",
|
|
601
601
|
"COG_AND_MARTY_TUTORIAL_MARTY_MOTION_BLOCKS": "Agora, vamos selecionar os blocos de movimento do Marty. Clique na categoria Movimento dos blocos do Marty.",
|
|
602
|
-
"COG_AND_MARTY_TUTORIAL_MARTY_DANCE_BLOCK": "Estamos quase lá! Arraste o bloco \"Marty Dance\" para
|
|
602
|
+
"COG_AND_MARTY_TUTORIAL_MARTY_DANCE_BLOCK": "Estamos quase lá! Arraste o bloco \"Marty Dance\" para baixo do bloco \"on touch cog\". Marty dançará quando o botão do Cog for pressionado.",
|
|
603
603
|
"COG_AND_MARTY_TUTORIAL_END": "Ótimo trabalho! Você codificou o Cog e o Marty para interagirem um com o outro. Agora clique no botão do Cog para ver o Marty dançar!",
|
|
604
604
|
"COG_JRBLOCKS1_TITLE": "1. Faça uma melodia",
|
|
605
605
|
"COG_JRBLOCKS1_STEP_1_TEXT": "Vamos fazer o Cog tocar uma música!",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"SAMPLE_PROJECTS": "Exempelprojekt",
|
|
5
5
|
"ABOUT_SCRATCHJR": "Om Blocks Jr",
|
|
6
6
|
"ABOUT_BLOCKS_JR_EYEBROW": "Made for curious creators",
|
|
7
|
-
"ABOUT_BLOCKS_JR_TAGLINE": "Create stories. Code characters. Bring
|
|
7
|
+
"ABOUT_BLOCKS_JR_TAGLINE": "Create stories. Code characters. Bring learning to life.",
|
|
8
8
|
"ABOUT_BLOCKS_JR_INTRODUCTION_TITLE": "A first step into creative coding",
|
|
9
9
|
"ABOUT_BLOCKS_JR_INTRODUCTION_DESCRIPTION": "Blocks Jr is Robotical's beginner-friendly block coding environment. Young learners snap together colourful blocks to make characters move, tell interactive stories, and control real robots—building confidence through play and experimentation.",
|
|
10
10
|
"ABOUT_BLOCKS_JR_FEATURES_TITLE": "What can you make?",
|
|
@@ -599,7 +599,7 @@
|
|
|
599
599
|
"COG_AND_MARTY_TUTORIAL_MARTY_MODE": "Låt oss nu flytta till Marty. Vi måste aktivera Marty Mode för att se Marty-blocken. Klicka på Marty Mode-knappen.",
|
|
600
600
|
"COG_AND_MARTY_TUTORIAL_ONMESSAGE_BLOCK": "Väl i Marty-läge, dra \"på meddelande\"-blocket från Marty Start-kategorin till skriptområdet. Detta block kommer att lyssna efter meddelandet som skickas av Cog.",
|
|
601
601
|
"COG_AND_MARTY_TUTORIAL_MARTY_MOTION_BLOCKS": "Låt oss nu välja Martys rörelseblock. Klicka på rörelsekategorin Marty-block.",
|
|
602
|
-
"COG_AND_MARTY_TUTORIAL_MARTY_DANCE_BLOCK": "Vi är nästan framme! Dra \"Marty Dance\"-blocket
|
|
602
|
+
"COG_AND_MARTY_TUTORIAL_MARTY_DANCE_BLOCK": "Vi är nästan framme! Dra \"Marty Dance\"-blocket under \"on touch cog\"-blocket. Marty dansar när Cogs knapp trycks in.",
|
|
603
603
|
"COG_AND_MARTY_TUTORIAL_END": "Bra jobbat! Du har framgångsrikt kodat Cog och Marty för att interagera med varandra. Klicka nu på Cogs knapp för att se Marty dansa!",
|
|
604
604
|
"COG_JRBLOCKS1_TITLE": "1. Gör en låt",
|
|
605
605
|
"COG_JRBLOCKS1_STEP_1_TEXT": "Låt oss få Cog att spela en låt!",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"SAMPLE_PROJECTS": "โครงงานตัวอย่าง",
|
|
5
5
|
"ABOUT_SCRATCHJR": "เกี่ยวกับ Blocks Jr",
|
|
6
6
|
"ABOUT_BLOCKS_JR_EYEBROW": "Made for curious creators",
|
|
7
|
-
"ABOUT_BLOCKS_JR_TAGLINE": "Create stories. Code characters. Bring
|
|
7
|
+
"ABOUT_BLOCKS_JR_TAGLINE": "Create stories. Code characters. Bring learning to life.",
|
|
8
8
|
"ABOUT_BLOCKS_JR_INTRODUCTION_TITLE": "A first step into creative coding",
|
|
9
9
|
"ABOUT_BLOCKS_JR_INTRODUCTION_DESCRIPTION": "Blocks Jr is Robotical's beginner-friendly block coding environment. Young learners snap together colourful blocks to make characters move, tell interactive stories, and control real robots—building confidence through play and experimentation.",
|
|
10
10
|
"ABOUT_BLOCKS_JR_FEATURES_TITLE": "What can you make?",
|
|
@@ -599,7 +599,7 @@
|
|
|
599
599
|
"COG_AND_MARTY_TUTORIAL_MARTY_MODE": "ตอนนี้มาดูที่ Marty กัน เราต้องเปิดใช้งานโหมด Marty เพื่อดูบล็อค Marty คลิกที่ปุ่มโหมด Marty",
|
|
600
600
|
"COG_AND_MARTY_TUTORIAL_ONMESSAGE_BLOCK": "เมื่ออยู่ในโหมด Marty ให้ลากบล็อก 'on message' จากหมวดหมู่ Marty Start ไปยังพื้นที่สคริปต์ บล็อกนี้จะคอยฟังข้อความที่ส่งโดย Cog",
|
|
601
601
|
"COG_AND_MARTY_TUTORIAL_MARTY_MOTION_BLOCKS": "ตอนนี้เรามาเลือกบล็อกการเคลื่อนไหวของ Marty กัน คลิกที่หมวดหมู่การเคลื่อนไหวในบล็อกของ Marty",
|
|
602
|
-
"COG_AND_MARTY_TUTORIAL_MARTY_DANCE_BLOCK": "ใกล้จะเสร็จแล้ว! ลากบล็อก 'Marty Dance'
|
|
602
|
+
"COG_AND_MARTY_TUTORIAL_MARTY_DANCE_BLOCK": "ใกล้จะเสร็จแล้ว! ลากบล็อก 'Marty Dance' ไปต่อใต้บล็อก 'on touch cog' Marty จะเต้นเมื่อกดปุ่มของ Cog",
|
|
603
603
|
"COG_AND_MARTY_TUTORIAL_END": "เยี่ยมมาก! คุณได้เขียนโค้ด Cog และ Marty ให้โต้ตอบกันได้สำเร็จแล้ว ตอนนี้คลิกปุ่มของ Cog เพื่อดู Marty เต้น!",
|
|
604
604
|
"COG_JRBLOCKS1_TITLE": "1. แต่งเพลง",
|
|
605
605
|
"COG_JRBLOCKS1_STEP_1_TEXT": "มาทำให้ Cog เล่นเพลงกันเถอะ!",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"SAMPLE_PROJECTS": "Örnek Projeler",
|
|
5
5
|
"ABOUT_SCRATCHJR": "Blocks Jr Hakkında",
|
|
6
6
|
"ABOUT_BLOCKS_JR_EYEBROW": "Made for curious creators",
|
|
7
|
-
"ABOUT_BLOCKS_JR_TAGLINE": "Create stories. Code characters. Bring
|
|
7
|
+
"ABOUT_BLOCKS_JR_TAGLINE": "Create stories. Code characters. Bring learning to life.",
|
|
8
8
|
"ABOUT_BLOCKS_JR_INTRODUCTION_TITLE": "A first step into creative coding",
|
|
9
9
|
"ABOUT_BLOCKS_JR_INTRODUCTION_DESCRIPTION": "Blocks Jr is Robotical's beginner-friendly block coding environment. Young learners snap together colourful blocks to make characters move, tell interactive stories, and control real robots—building confidence through play and experimentation.",
|
|
10
10
|
"ABOUT_BLOCKS_JR_FEATURES_TITLE": "What can you make?",
|
|
@@ -599,7 +599,7 @@
|
|
|
599
599
|
"COG_AND_MARTY_TUTORIAL_MARTY_MODE": "Şimdi Marty'ye geçelim. Marty bloklarını görmek için Marty Modunu etkinleştirmemiz gerekiyor. Marty Modu düğmesine tıklayın.",
|
|
600
600
|
"COG_AND_MARTY_TUTORIAL_ONMESSAGE_BLOCK": "Marty Modu'ndayken, 'on message' bloğunu Marty Start kategorisinden script alanına sürükleyin. Bu blok Cog tarafından gönderilen mesajı dinleyecektir.",
|
|
601
601
|
"COG_AND_MARTY_TUTORIAL_MARTY_MOTION_BLOCKS": "Şimdi Marty'nin hareket bloklarını seçelim. Marty bloklarının Hareket kategorisine tıklayın.",
|
|
602
|
-
"COG_AND_MARTY_TUTORIAL_MARTY_DANCE_BLOCK": "Neredeyse oradayız! 'Marty Dance' bloğunu
|
|
602
|
+
"COG_AND_MARTY_TUTORIAL_MARTY_DANCE_BLOCK": "Neredeyse oradayız! 'Marty Dance' bloğunu 'on touch cog' bloğunun altına sürükleyin. Cog'un düğmesine basıldığında Marty dans edecek.",
|
|
603
603
|
"COG_AND_MARTY_TUTORIAL_END": "Harika iş! Cog ve Marty'yi birbirleriyle etkileşime girecek şekilde başarıyla kodladınız. Şimdi Marty'nin dansını görmek için Cog'un düğmesine tıklayın!",
|
|
604
604
|
"COG_JRBLOCKS1_TITLE": "1. Bir melodi yap",
|
|
605
605
|
"COG_JRBLOCKS1_STEP_1_TEXT": "Haydi Cog'a bir şarkı çaldıralım!",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"SAMPLE_PROJECTS": "Зразки проєктів",
|
|
5
5
|
"ABOUT_SCRATCHJR": "Про Blocks Jr",
|
|
6
6
|
"ABOUT_BLOCKS_JR_EYEBROW": "Made for curious creators",
|
|
7
|
-
"ABOUT_BLOCKS_JR_TAGLINE": "Create stories. Code characters. Bring
|
|
7
|
+
"ABOUT_BLOCKS_JR_TAGLINE": "Create stories. Code characters. Bring learning to life.",
|
|
8
8
|
"ABOUT_BLOCKS_JR_INTRODUCTION_TITLE": "A first step into creative coding",
|
|
9
9
|
"ABOUT_BLOCKS_JR_INTRODUCTION_DESCRIPTION": "Blocks Jr is Robotical's beginner-friendly block coding environment. Young learners snap together colourful blocks to make characters move, tell interactive stories, and control real robots—building confidence through play and experimentation.",
|
|
10
10
|
"ABOUT_BLOCKS_JR_FEATURES_TITLE": "What can you make?",
|
|
@@ -599,7 +599,7 @@
|
|
|
599
599
|
"COG_AND_MARTY_TUTORIAL_MARTY_MODE": "Тепер перейдемо до Марті. Нам потрібно ввімкнути режим Марті, щоб побачити блоки Марті. Натисніть кнопку режиму Марті.",
|
|
600
600
|
"COG_AND_MARTY_TUTORIAL_ONMESSAGE_BLOCK": "У режимі Marty перетягніть блок «on message» із категорії Marty Start до області сценарію. Цей блок прослуховуватиме повідомлення, надіслане Cog.",
|
|
601
601
|
"COG_AND_MARTY_TUTORIAL_MARTY_MOTION_BLOCKS": "Тепер давайте виберемо блоки руху Марті. Клацніть категорію «Рух» блоків Марті.",
|
|
602
|
-
"COG_AND_MARTY_TUTORIAL_MARTY_DANCE_BLOCK": "Ми майже на місці! Перетягніть блок «Marty Dance»
|
|
602
|
+
"COG_AND_MARTY_TUTORIAL_MARTY_DANCE_BLOCK": "Ми майже на місці! Перетягніть блок «Marty Dance» під блок «on touch cog». Марті танцюватиме, коли буде натиснуто кнопку Cog.",
|
|
603
603
|
"COG_AND_MARTY_TUTORIAL_END": "Чудова робота! Ви успішно закодували Cog і Marty для взаємодії один з одним. Тепер натисніть кнопку Cog, щоб побачити танці Марті!",
|
|
604
604
|
"COG_JRBLOCKS1_TITLE": "1. Складіть мелодію",
|
|
605
605
|
"COG_JRBLOCKS1_STEP_1_TEXT": "Давайте змусимо Cog заграти мелодію!",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"SAMPLE_PROJECTS": "项目示例",
|
|
5
5
|
"ABOUT_SCRATCHJR": "关于 Blocks Jr",
|
|
6
6
|
"ABOUT_BLOCKS_JR_EYEBROW": "Made for curious creators",
|
|
7
|
-
"ABOUT_BLOCKS_JR_TAGLINE": "Create stories. Code characters. Bring
|
|
7
|
+
"ABOUT_BLOCKS_JR_TAGLINE": "Create stories. Code characters. Bring learning to life.",
|
|
8
8
|
"ABOUT_BLOCKS_JR_INTRODUCTION_TITLE": "A first step into creative coding",
|
|
9
9
|
"ABOUT_BLOCKS_JR_INTRODUCTION_DESCRIPTION": "Blocks Jr is Robotical's beginner-friendly block coding environment. Young learners snap together colourful blocks to make characters move, tell interactive stories, and control real robots—building confidence through play and experimentation.",
|
|
10
10
|
"ABOUT_BLOCKS_JR_FEATURES_TITLE": "What can you make?",
|
|
@@ -599,7 +599,7 @@
|
|
|
599
599
|
"COG_AND_MARTY_TUTORIAL_MARTY_MODE": "现在让我们转到 Marty。我们需要启用 Marty 模式才能查看 Marty 积木。点击 Marty 模式按钮。",
|
|
600
600
|
"COG_AND_MARTY_TUTORIAL_ONMESSAGE_BLOCK": "进入 Marty 模式后,将“on message”积木从 Marty Start 类别拖到脚本区域。该积木将监听 Cog 发送的消息。",
|
|
601
601
|
"COG_AND_MARTY_TUTORIAL_MARTY_MOTION_BLOCKS": "现在,让我们选择 Marty 的运动积木。点击 Marty 积木的“运动”类别。",
|
|
602
|
-
"COG_AND_MARTY_TUTORIAL_MARTY_DANCE_BLOCK": "快完成了!将“Marty Dance
|
|
602
|
+
"COG_AND_MARTY_TUTORIAL_MARTY_DANCE_BLOCK": "快完成了!将“Marty Dance”积木连接到“on touch cog”积木下方。按下 Cog 的按钮时,Marty 就会跳舞。",
|
|
603
603
|
"COG_AND_MARTY_TUTORIAL_END": "太棒了!你成功编写了 Cog 和 Marty 之间的交互代码。现在点击 Cog 的按钮,就能看到 Marty 跳舞啦!",
|
|
604
604
|
"COG_JRBLOCKS1_TITLE": "1. 创作一首曲子",
|
|
605
605
|
"COG_JRBLOCKS1_STEP_1_TEXT": "让我们让 Cog 演奏一段曲子吧!",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"SAMPLE_PROJECTS": "專案樣本",
|
|
5
5
|
"ABOUT_SCRATCHJR": "關於 Blocks Jr",
|
|
6
6
|
"ABOUT_BLOCKS_JR_EYEBROW": "Made for curious creators",
|
|
7
|
-
"ABOUT_BLOCKS_JR_TAGLINE": "Create stories. Code characters. Bring
|
|
7
|
+
"ABOUT_BLOCKS_JR_TAGLINE": "Create stories. Code characters. Bring learning to life.",
|
|
8
8
|
"ABOUT_BLOCKS_JR_INTRODUCTION_TITLE": "A first step into creative coding",
|
|
9
9
|
"ABOUT_BLOCKS_JR_INTRODUCTION_DESCRIPTION": "Blocks Jr is Robotical's beginner-friendly block coding environment. Young learners snap together colourful blocks to make characters move, tell interactive stories, and control real robots—building confidence through play and experimentation.",
|
|
10
10
|
"ABOUT_BLOCKS_JR_FEATURES_TITLE": "What can you make?",
|
|
@@ -599,7 +599,7 @@
|
|
|
599
599
|
"COG_AND_MARTY_TUTORIAL_MARTY_MODE": "現在讓我們轉到 Marty。我們需要啟用 Marty 模式才能查看 Marty 積木。點擊 Marty 模式按鈕。",
|
|
600
600
|
"COG_AND_MARTY_TUTORIAL_ONMESSAGE_BLOCK": "進入 Marty 模式後,將「on message」積木從 Marty Start 類別拖曳到腳本區域。該積木將監聽 Cog 發送的訊息。",
|
|
601
601
|
"COG_AND_MARTY_TUTORIAL_MARTY_MOTION_BLOCKS": "現在,讓我們選擇 Marty 的運動積木。點選 Marty 積木的「運動」類別。",
|
|
602
|
-
"COG_AND_MARTY_TUTORIAL_MARTY_DANCE_BLOCK": "
|
|
602
|
+
"COG_AND_MARTY_TUTORIAL_MARTY_DANCE_BLOCK": "快完成了!將「Marty Dance」積木連接到「on touch cog」積木下方。按下 Cog 的按鈕時,Marty 就會跳舞。",
|
|
603
603
|
"COG_AND_MARTY_TUTORIAL_END": "太棒了!你成功寫了 Cog 和 Marty 之間的互動程式碼。現在點擊 Cog 的按鈕,就能看到 Marty 跳舞啦!",
|
|
604
604
|
"COG_JRBLOCKS1_TITLE": "1. 創作一首曲子",
|
|
605
605
|
"COG_JRBLOCKS1_STEP_1_TEXT": "讓我們讓 Cog 演奏一段曲子吧!",
|
package/package.json
CHANGED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { afterEach, describe, expect, it, vi } from "vitest";
|
|
2
|
+
import goToLink from "../src/utils/goToLink";
|
|
3
|
+
|
|
4
|
+
describe("goToLink", () => {
|
|
5
|
+
afterEach(() => {
|
|
6
|
+
vi.unstubAllGlobals();
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
it("keeps query parameters when the server redirects HTML pages to clean URLs", async () => {
|
|
10
|
+
const targetWindow = { location: { href: "initial" } };
|
|
11
|
+
const fetchMock = vi.fn().mockResolvedValue({ redirected: true });
|
|
12
|
+
vi.stubGlobal("fetch", fetchMock);
|
|
13
|
+
|
|
14
|
+
await goToLink(
|
|
15
|
+
"http://localhost:3011/editor.html?pmd5=-1&mode=edit&tutorial=marty-jr-blocks-1",
|
|
16
|
+
targetWindow
|
|
17
|
+
);
|
|
18
|
+
|
|
19
|
+
expect(fetchMock).toHaveBeenCalledWith(
|
|
20
|
+
"http://localhost:3011/editor.html?pmd5=-1&mode=edit&tutorial=marty-jr-blocks-1"
|
|
21
|
+
);
|
|
22
|
+
expect(targetWindow.location.href).toBe(
|
|
23
|
+
"http://localhost:3011/editor?pmd5=-1&mode=edit&tutorial=marty-jr-blocks-1"
|
|
24
|
+
);
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
it("keeps HTML page URLs for wrapper servers that do not redirect", async () => {
|
|
28
|
+
const targetWindow = { location: { href: "initial" } };
|
|
29
|
+
vi.stubGlobal("fetch", vi.fn().mockResolvedValue({ redirected: false }));
|
|
30
|
+
|
|
31
|
+
await goToLink("./MartyBlocksJR/editor.html?tutorial=cog-jrblocks-1", targetWindow);
|
|
32
|
+
|
|
33
|
+
expect(targetWindow.location.href).toBe(
|
|
34
|
+
"./MartyBlocksJR/editor.html?tutorial=cog-jrblocks-1"
|
|
35
|
+
);
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
it("falls back to the HTML page URL when redirect detection is unavailable", async () => {
|
|
39
|
+
const targetWindow = { location: { href: "initial" } };
|
|
40
|
+
vi.stubGlobal("fetch", vi.fn().mockRejectedValue(new Error("fetch unavailable")));
|
|
41
|
+
|
|
42
|
+
await goToLink("editor.html?tutorial=cog-and-marty-tutorial", targetWindow);
|
|
43
|
+
|
|
44
|
+
expect(targetWindow.location.href).toBe(
|
|
45
|
+
"editor.html?tutorial=cog-and-marty-tutorial"
|
|
46
|
+
);
|
|
47
|
+
});
|
|
48
|
+
});
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { describe, expect, it, vi } from 'vitest';
|
|
2
|
+
|
|
3
|
+
vi.mock('@/utils/Localization', () => ({
|
|
4
|
+
default: {
|
|
5
|
+
localize: key => key
|
|
6
|
+
}
|
|
7
|
+
}));
|
|
8
|
+
|
|
9
|
+
describe('Cog and Marty tutorial', () => {
|
|
10
|
+
it('builds one direct Cog-triggered Marty script in Marty mode', async () => {
|
|
11
|
+
const { default: tutorial } = await import('@/tutorial/tutorials-data/cog-and-marty.js');
|
|
12
|
+
const steps = tutorial.tutorialSteps;
|
|
13
|
+
const actions = steps.flatMap(step => [
|
|
14
|
+
...(step.instructionActions || []),
|
|
15
|
+
...(step.nextStepActions || []),
|
|
16
|
+
...(step.hintActions || [])
|
|
17
|
+
]);
|
|
18
|
+
|
|
19
|
+
expect(steps).toHaveLength(8);
|
|
20
|
+
const cogCategoryStep = steps.find(step =>
|
|
21
|
+
step.instructionActions.some(action => action.text === 'COG_AND_MARTY_TUTORIAL_COG_BLOCKS'));
|
|
22
|
+
expect(cogCategoryStep.nextStepActions[0]).toEqual({ type: 'ShowMartyMode' });
|
|
23
|
+
expect(actions.filter(action => action.type === 'HighlightElement').map(action => action.elementId))
|
|
24
|
+
.not.toContain('martyMode');
|
|
25
|
+
|
|
26
|
+
expect(actions.filter(action => action.type === 'ShowCategory').map(action => action.category))
|
|
27
|
+
.not.toContain('sprite-start');
|
|
28
|
+
expect(actions.flatMap(action => action.blocks || (action.block ? [action.block] : [])))
|
|
29
|
+
.not.toEqual(expect.arrayContaining(['message_block', 'onmessage_block']));
|
|
30
|
+
expect(actions.filter(action => action.type === 'ShowInstructorText').map(action => action.text))
|
|
31
|
+
.not.toEqual(expect.arrayContaining([
|
|
32
|
+
'COG_AND_MARTY_TUTORIAL_SPRITE_BLOCKS',
|
|
33
|
+
'COG_AND_MARTY_TUTORIAL_MESSAGE_BLOCK',
|
|
34
|
+
'COG_AND_MARTY_TUTORIAL_ONMESSAGE_BLOCK'
|
|
35
|
+
]));
|
|
36
|
+
|
|
37
|
+
expect(steps.flatMap(step => step.expectedCode || [])).toEqual([
|
|
38
|
+
'ontouchcog',
|
|
39
|
+
'ontouchcog=>martyDance'
|
|
40
|
+
]);
|
|
41
|
+
});
|
|
42
|
+
});
|
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: ["
|
|
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
|
|
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: [
|
|
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: "
|
|
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: "
|
|
166
|
+
category: "cog-start"
|
|
279
167
|
},
|
|
280
168
|
{
|
|
281
169
|
type: "HighlightBlocks",
|
|
282
|
-
blocks: ["
|
|
170
|
+
blocks: ["ontouchcog_block"]
|
|
283
171
|
},
|
|
284
172
|
{
|
|
285
173
|
type: "DragBlockToScriptArea",
|
|
286
|
-
block: "
|
|
174
|
+
block: "ontouchcog_block",
|
|
287
175
|
}
|
|
288
176
|
],
|
|
289
177
|
buttons: ["previous", "next", "hint"],
|
|
290
|
-
expectedCode: ["
|
|
178
|
+
expectedCode: ["ontouchcog"],
|
|
291
179
|
presenter: "marty"
|
|
292
180
|
},
|
|
293
|
-
/* STEP
|
|
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
|
|
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 '
|
|
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: ["
|
|
246
|
+
expectedCode: ["ontouchcog=>martyDance"],
|
|
359
247
|
presenter: "marty"
|
|
360
248
|
},
|
|
361
|
-
/* STEP
|
|
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.
|
|
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: [],
|