COMP 310
|
Lec04: Ballworld Design, continued... |
![]() ![]() ![]() ![]() |
Here are some optional, though potentially useful utility classes you may use or adapt in your code:
ballworld.SineMaker -- A class that has methods that create sinusoidally varying numerical values, useful for situations where you want something to go up and down in size or value. This class is not a Singleton, so multiple instances of SineMaker will run independently.
ballworld.IRandomizer -- An interface that defines methods to return various random values,such as Point locations, velocities, colors, etc.
ballworld.Randomizer -- A Singleton implementation of the IRandomizer interface.
command.ILambda -- An interface specifying a generic Command object (lambda function). Useful for call-back commands, etc.
command.NoOpLambda -- A Singleton ILambda implementation that does nothing except return its input parameter. Useful for initializing ILambda's to insure well-defined behavior at all times and eliminate problems with null pointer errors on uninitialized commands.
Thursday afternoon, 1-4 PM in OEDK somewhere?
Using the Java API resources: Click the "Resources" button above and navigate to the "Comp310 Java Resources" page and follow the links to the Java API documentation.
© 2010 by Stephen Wong