public class ObstacleFactory
extends java.lang.Object
Author:
Alfio E. Fresta
A class used to generate obstacles.
Usage example:
ObstacleFactory f = new ObstacleFactory();
f.setProbability(.3); // 30% chance of getting an obstacle
Obstacle o = f.getObstacle(player);
if ( o == null ) {
System.out.println("You got lucky.");
} else {
System.out.println("Oh no, something bad happened.");
}