🧠Concept
Pick the right answer.
👀Code Reading
Look at the blocks. Predict what happens.
define apply option if <(option) = (1)> then set [spawn_delay v] to (3) set [enemy_speed v] to (2) else set [spawn_delay v] to (1) set [enemy_speed v] to (5) end
define count votes
set [vote_1 v] to (0)
set [vote_2 v] to (0)
set [i v] to (1)
repeat (length of [votes v])
if <(item (i) of [votes v]) = [1]> then
change [vote_1 v] by (1)
else
change [vote_2 v] by (1)
end
change [i v] by (1)
endwhen I receive [test_2 v] set [option v] to (2) apply option ::custom measure smooth ::custom add (frames) to [test_results v]
🐛Find the Bug
Something is broken. Pick the fix.
The second test run always looks smoother than the first, even with many more enemies.
define measure smooth set [enemies v] to ((6) / (spawn_delay)) repeat ((60) / (enemies)) change [frames v] by (1) end
🛠️Build It
Pick a level. Build it. Check the boxes.
Apply option 1, then option 2.
More
Add a custom block apply option to your launched game. Option 1 sets a calm spawn_delay and enemy_speed; option 2 sets a busy pair.
Done when
Calling apply option with option 1 and then option 2 changes both numbers each time.
Count the frames from 60 moves.
More
Add a custom block measure smooth that counts the frames one test gets from 60 moves of work. Run both options and add each count to a test_results list.
Done when
The test_results list holds two numbers, one per test run, and each run starts its count from zero.
Count votes and show the winner.
More
Ask three players to vote, save every vote in a list, count the list with one loop, and show the winning version with the cost of the busy option.
Done when
The show names the version the players picked, its vote count, and how many loop turns the busy option gives up.
Review the student's project, then check each thing they did.
Project Evaluation
0 of 5 ticked
💬Talk About It
Present your project to your teacher or a classmate.
- 1️⃣Show your two test runs to your teacher or a friend.
- 2️⃣Point to four things: (1) the two numbers inside
apply option; (2) the two counts intest_results— say which run was smoother; (3) the vote count from your players; (4) theif <(vote_1) > (vote_2)>block that picks the winner. - 3️⃣Then say one benefit and one risk of the busy version, and name one job that weighs this same choice at work.
Watch the student present, then check each thing they did.
Presentation Checklist
0 of 5 ticked
📤Submit
Send your results to your teacher and parent.
0 of 0 answered