Referenced from lesson Key Events
Decrease the cat’s hunger level by 2 and sleep level by 1 on each tick.
Draw a sketch for three distinct moments of the animation
Sketch A |
Sketch B |
Sketch C |
What things are changing?
Thing | Describe how it changes |
---|---|
|
|
|
|
|
|
|
What fields do you need to represent the things that change?
Field name (dangerX, score, playerIMG …) | Datatype (Number, String, Image, Boolean …) |
---|---|
|
|
|
|
|
|
|
Make a To-Do List, and check off each as “Done” when you finish each one.
Component | When is there work to be done? | To-Do | Done |
---|---|---|---|
Data Structure |
If any new field(s) were added, changed, or removed |
☐ |
☐ |
draw-state |
If something is displayed in a new way or position |
☑ |
☐ |
next-state-tick |
If the Data Structure changed, or the animation happens automatically |
☐ |
☐ |
next-state-key |
If the Data Structure changed, or a keypress triggers the animation |
☐ |
☐ |
reactor |
If either next-state function is new |
☐ |
☐ |
These materials were developed partly through support of the National Science Foundation,
(awards 1042210, 1535276, 1648684, and 1738598).
Bootstrap:Reactive by Emma Youndtsmith, Emmanuel Schanzer, Kathi Fisler, Shriram Krishnamurthi, Joe Politz and Dorai Sitaram
is licensed under a
Creative Commons 4.0 Unported License.
Based on a work at www.BootstrapWorld.org.
Permissions beyond the scope of this license may be available by contacting
schanzer@BootstrapWorld.org.