COMP 310
|
Composition-based
Ballworld Demo
|
 |
Note: it is
an Honor Code violation to attempt to decompile any supplied code
This composition-based Ballworld demonstrates the ability of
composition-based systems to add dynamically modifiable behaviors to a system.
- Type the name of a strategy into the text field on the left. See the
list below for the available strategies. Clicking the "Add
to Lists" button will then add it to both the drop lists.
- "Make Selected Ball" will
make a ball with the strategy selected on the top drop list.
- "Combine!" will dynamically
create a strategy that is the combination of the strategies selected on top
and bottom lists. The new strategy is placed back into both drop lists and
can be used again for combining. For instance, add then combine "Curve"
and "Breathing" to make a ball that curves and
breathes.
- "Make Switcher" will make a
ball, initially, ones that go straight.
- Clicking "Switch!" will
cause all Switcher balls ever made to switch behaviors to whatever is the
selected strategy on the top drop list. Switcher balls made later will have
the same behavior as whatever the previously made Switchers have.
If you hold the mouse over any button, a tooltip will pop up that will
tell you what that button does.
The following different types of strategies are available for use:
- Straight
- Curve
- Color
- Breathing
- Wander
- Drunken
- Change1
- Change2
[ Back to the Ballworld Demos ]
Trouble Running the Demos?
© 2017 by Stephen Wong