All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class pinball.player.random.RandomStrategy

java.lang.Object
   |
   +----java.lang.Thread
           |
           +----pinball.player.Strategy
                   |
                   +----pinball.player.random.RandomStrategy

public class RandomStrategy
extends Strategy
Player who randomly flips the flippers.


Constructor Index

 o RandomStrategy()
Required for extended class.
 o RandomStrategy(Buffer, TextArea, Camera)
The strategy thread for the player.

Method Index

 o decision()
Should you flip or not.

Constructors

 o RandomStrategy
 public RandomStrategy(Buffer buffer,
                       TextArea gameStats,
                       Camera camera)
The strategy thread for the player.

Parameters:
buffer - the first buffer in the series of buffers for the system.
gameStats - the area to write the game stats to.
camera - the camera for the system.
 o RandomStrategy
 public RandomStrategy()
Required for extended class.

Methods

 o decision
 public void decision()
Should you flip or not. 1/3 flip left, 1/3 right & 1/3 both.

Overrides:
decision in class Strategy

All Packages  Class Hierarchy  This Package  Previous  Next  Index