Preamble 2: behaviors for Laser Socks and Mole Tank implemented in a hypothetical scripting language. Wouldn't actually work (I'm being sloppy about the semantics of "when"), but demonstrates some aspects of the object model:
- local state (green underline)
- observables (red underline)
- reacting to observations ("when")