All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class pinball.player.human.HumanStrategy

java.lang.Object
   |
   +----java.lang.Thread
           |
           +----pinball.player.Strategy
                   |
                   +----pinball.player.human.HumanStrategy

public class HumanStrategy
extends Strategy
Human player plays pinball.


Variable Index

 o commands
The command from the human to flip the flippers.
 o frame
Frame number.
 o frameRate
Frame frame for requesting images.
 o lastLeft
The previous flip status of the flippers.
 o lastRight
The previous flip status of the flippers.
 o window
The window to draw to.

Constructor Index

 o HumanStrategy()
For extended classes.
 o HumanStrategy(Buffer, TextArea, Camera)
The strategy thread for the player.

Method Index

 o decision()
Have the human presss the keys to raise of lower the flippers.
 o flippersReset()
Don't let the flippers reset on their own.
 o getImage()
Return the image from the stub.

Variables

 o window
 protected HumanWindow window
The window to draw to.

 o commands
 protected FlipperCommands commands
The command from the human to flip the flippers.

 o lastLeft
 protected boolean lastLeft
The previous flip status of the flippers.

 o lastRight
 protected boolean lastRight
The previous flip status of the flippers.

 o frameRate
 protected int frameRate
Frame frame for requesting images.

 o frame
 protected int frame
Frame number.

Constructors

 o HumanStrategy
 public HumanStrategy(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 HumanStrategy
 public HumanStrategy()
For extended classes.

Methods

 o flippersReset
 public void flippersReset()
Don't let the flippers reset on their own. The human player will reset them.

Overrides:
flippersReset in class Strategy
 o getImage
 public Image getImage()
Return the image from the stub.

 o decision
 public void decision()
Have the human presss the keys to raise of lower the flippers.

Overrides:
decision in class Strategy

All Packages  Class Hierarchy  This Package  Previous  Next  Index