![]() |
CS111 BuggleWorld Contract |
An instance of the BuggleWorld class represents
a world that may be inhabited by buggles and their bagels.
Because BuggleWorld is a subclass of
Applet instances of BuggleWorld
are not constructed directly. Instead,
a BuggleWorld instance is constructed
each time an applet is executed.
BuggleWorld programs are specified by declaring subclasses of
BuggleWorld that override the default (do-nothing)
run method. This method will be executed
when the Run button is pressed in an instance
of BuggleWorld.
Instance Methods
public void run ()
Execute specified buggle actions in this buggle world.
BuggleWorld has many other instance methods
used to communicate the state of the world to individual
buggles (e.g., the color of a cell at a given position,
whether a bagel is at a given position, etc.).
These are not intended to be manipulated directly by programmers
and so are not listed here.