3 ms·
Scratch is actually pretty good at expressing state machines. Since all statements are atomic and all scripts on a sprite run in parallel, you can write one scr
by myhf 10y ago
Scratch is actually pretty good at expressing state machines. Since all statements are atomic and all scripts on a sprite run in parallel, you can write one script that says
forever:
wait until Today == Saturday
repeat until Today != Saturday:
do things outside
and another script that says
forever:
wait until Today == Thursday
repeat until Today != Thursday:
if there is trash:
take out the trash
and then any process that updates `Today` will cause the sprite to perform the right behavior on the right day.