All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class pinball.player.draw.DrawStrategy

java.lang.Object
   |
   +----java.lang.Thread
           |
           +----pinball.player.Strategy
                   |
                   +----pinball.player.draw.DrawStrategy

public class DrawStrategy
extends Strategy
The player draws objects on the screen for the person to touch.


Constructor Index

 o DrawStrategy(Buffer, TextArea, Camera)
The strategy thread for the player.

Method Index

 o decision()
Should you flip or not.
 o draw(Graphics, int, int)
Draw some objects for the person touch.

Constructors

 o DrawStrategy
 public DrawStrategy(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.

Methods

 o decision
 public void decision()
Should you flip or not. It never flips.

Overrides:
decision in class Strategy
 o draw
 public void draw(Graphics g,
                  int canvasWidth,
                  int canvasHeight)
Draw some objects for the person touch. If they touch them, change the object's color.

Parameters:
g - the graphics to draw to.
cavasWidth - the width of the canvas.
canvcasHeight - the hight of the canvas.
Overrides:
draw in class Strategy

All Packages  Class Hierarchy  This Package  Previous  Next  Index