From 6a92018af28715505f8df6b0ef3bbab0e997a7e3 Mon Sep 17 00:00:00 2001 From: JP Fasano Date: Wed, 19 Apr 2023 09:25:48 -0600 Subject: [PATCH 1/2] Wording for assignment is changed to match the provided solution. See discussion https://github.com/TEALSK12/introduction-to-computer-science/discussions/344 --- do_now_32.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/do_now_32.md b/do_now_32.md index f8f1691f..e870ad13 100644 --- a/do_now_32.md +++ b/do_now_32.md @@ -9,5 +9,5 @@ * Move Dino up 1 unit at a time when you press the **arrow up** key. You must use the **change y by** block. * Move Dino down 1 unit at a time when you press the **arrow down** key. You must use the **change y by** block. * Don't let Dino leave the screen. - * Don't let Dino go through the platform. + * Don't let Dino move down through the platform. * Don't let Dino go underground. From 4ef235c605e52e8d9af15f45493737823c2ee64f Mon Sep 17 00:00:00 2001 From: JP Fasano Date: Fri, 21 Apr 2023 11:16:55 -0600 Subject: [PATCH 2/2] Added additional scaffolding needed by my students. This in part includes instructions on creating and setting a speed variable. --- lab_32.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lab_32.md b/lab_32.md index 62f27581..2bc16f24 100644 --- a/lab_32.md +++ b/lab_32.md @@ -10,11 +10,15 @@ Go to the starter project at [https://aka.ms/Intro-lab3-2](https://aka.ms/Intro- Write a script for the Dino sprite so that: -1. Use one **when green flag is clicked** block to place Dino at the top of the stage. No animation, just use **set y to** block. +1. Use a **when green flag is clicked** block to place Dino at the top of the stage. No animation, just use a **set y to** block. -2. Use two more **when green flag is clicked**, to start two **forever** loops that make Dino fall to the bottom of the stage. One will model gravity by subtracting a constant amount from Dino's speed. The second will move Dino by his current speed. +2. Create a variable named **speed**. Set **speed** to zero **when green flag is clicked**. -3. When Dino touches the ground, Dino stops falling. "*Stops falling*" means Dino's speed is set to zero and stays zero as long as he is touching the ground. The **touching color ?** block can be used to detect the grass in the background layer. +3. Use two more **when green flag is clicked** blocks, to start two **forever** loops to make Dino fall. + * One will model gravity by subtracting a constant amount from Dino's speed. Initially try subtracting 0.5 from speed. + * The second will move Dino in the y-direction by the current speed. + +4. When Dino touches the ground, Dino stops falling. "*Stops falling*" means Dino's speed is set to zero and stays zero if Dino is touching the ground. The **touching color ?** block can be used to detect the grass in the background layer. When using the **touching color** block, change the color by clicking on the color box, then select anything in the color palette or stage that has the desired color.