Dim-state Game 2

Example 2: Start using relationships between variables.
We have set up "friends" as a function of "enemies", and "power" as a function of "friends" and "enemies".
When we click the button, we only update "enemies" programmatically. Friends and power update automatically, as well as the numbers in the page!


You have {{{enemies}}} enemies left to kill

You have {{{friends}}} friends left to love

Summary of state: you have {{{enemies}}} enemies left to kill and your power is {{{power}}}.