in scratch
2 "when green flag clicked" blocks
the 2 threads communicate with each other using things like variables
in scratch
2 "when green flag clicked" blocks
the 2 threads communicate with each other using things like variables
A technique often used in software engineering is :
when a key is pressed, check a variable and toggle it
- functions
-conditions
-Boolean expressions
-loops
-variables
-threads
-events
...
[Source: Harvard, CS50]