All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class pinball.GameOptions

java.lang.Object
   |
   +----pinball.GameOptions

public class GameOptions
extends Object
The game options used in the pinball game. It contains numerous parameters for the system.


Variable Index

 o analyze
Status should analyze thread run.
 o arguments
Command line arguments.
 o ballInPlay
Current ball in play.
 o ballMax
The max size for the ball.
 o ballMin
The min size for the ball.
 o ballOutOfPlay
Used to see if ball is out of play.
 o ballsToPlay
Number of ball's to play before ending.
 o buffersize
Number of buffers in the system.
 o clientMode
Client mode.
 o dataIO
The device used for data IO.
 o dataPort
Port used for data IO.
 o debug
The debug level for the program.
 o display
Should the system display an image.
 o exitSystem
Used when exiting the system.
 o findFlippers
Number of trys the system uses to average the flipper positions.
 o flip
Used for the flippers file.
 o flipin
Used for the flippers file.
 o flipout
Used for the flippers file.
 o flippersFile
Name of the flippers file.
 o flipperSpace
The radius around the flipper that are to be ignored.
 o flipperThreshold
The hight from the flipper to the top the flipper test area.
 o flipperZone
The Y location for the top of the flipper zone.
 o flipperZoneSize
The size of the flipper Zone.
 o flipto
Used for the flippers file.
 o foundFlippers
Have the flippers been found.
 o framerate
Display every nth frame on the screen.
 o launchBall
Should the ball be launched.
 o locateFlippers
Should the sytem locate the flippers.
 o logFileName
Name of the log file.
 o moveThreshold
The distance that a ball can move and still be considered a ball.
 o networkHost
Network Host.
 o networkPort
Port used for the network.
 o pause
System is paused.
 o pixelrate
Number of pixels to increment when scanning the image.
 o pixelThreshold
The amount a pixel's index needs to change to be consided it changed.
 o play
Play a game back.
 o plunger
Plunger for the system.
 o post
Status should post analyze thread run.
 o readFlippersFile
Should the flippers locations be read from a file.
 o record
Record a game.
 o refindFlippers
Refinding the flippers.
 o resetTime
How long from flipper up to the flipper is reset.
 o running
Flag to determine if the system is running.
 o strategy
Status should strategy thread run.
 o verbose
Is the display in verbose mode.
 o writeFlippersFile
Should the flipper's locations be saved to a file.

Constructor Index

 o GameOptions()

Method Index

 o analyze()
Get the analyze thread status.
 o analyze(boolean)
Set the status of the analyze thread.
 o ballInPlay()
Get the number of the ball in play.
 o ballInPlay(int)
Set ball in play number.
 o ballMax()
Get the maximum size of a ball.
 o ballMax(int)
Set the maximum size of a ball.
 o ballMin()
Get the minimum size of a ball.
 o ballMin(int)
Set the minimum size of a ball.
 o ballOutOfPlay()
See if the ball was forced out of play
 o ballOutOfPlay(boolean)
Tell if the ball was forced out of play.
 o ballsToPlay()
Get the number of balls to play.
 o ballsToPlay(int)
Set the number of ball's to play before exiting.
 o bufferSize()
Get the buffer size for the sytem.
 o bufferSize(int)
Setup the number of buffers.
 o client()
Is the program running in client mode.
 o clientMode()
Set the system for client mode.
 o dataPort()
Get the port for data IO.
 o debug()
The debug level.
 o display()
Get the display status.
 o exitSystem()
Exit the system.
 o findFlippers()
Get the number of times to check the flippers.
 o findFlippers(int)
Set the number of times to check the flippers.
 o flipperSpace()
Get the radius around the flippers to ignore.
 o flipperSpace(int)
Set the radius around the flippers to ignore.
 o flipperThreshold()
Get the flipper threshold.
 o flipperZone()
Get the flipper zone.
 o flipperZone(int)
Set the flipper zone.
 o flipperZoneSize()
Get the flipper zone size.
 o foundFlippers()
Get the flipper's found status.
 o foundFlippers(boolean)
Set the flipper's found status.
 o frameRate()
Get the frame rate for the system.
 o frameRate(int)
Setup the frame rate for the system.
 o getArgs()
Get the command line arguments.
 o getDataIO()
Get the device used for data IO.
 o getFlippersFileRead()
Get the flipper file for reading.
 o getFlippersFileWrite()
Get the flipper file for writting.
 o getPlunger()
Get the plunger in the system.
 o launchBall()
Get the status of whether the system should launch the ball.
 o launchBall(boolean)
Set the status of whether the system should launch the ball.
 o live()
Set the system into live mode.
 o locateFlippers()
Should the system find the flippers?
 o locateFlippers(boolean)
Set whether the system should find the location of the flippers.
 o logFileName()
Get the name of the log file.
 o logFileName(String)
Set the name of the log file for playback.
 o moveThreshold()
Get the move threshold.
 o moveThreshold(int)
Set the move threshold.
 o networkHost()
Get the network host.
 o networkPort()
Get the network port.
 o pause()
Get the pause state of the system
 o pause(boolean)
Set the pause state of the system.
 o pixelRate()
Get the pixel rate for the system.
 o pixelRate(int)
Set the pixel rate for the system.
 o pixelThreshold()
Get the pixel threshold.
 o pixelThreshold(int)
Set the pixel threshold.
 o play()
Is the system to playback the images.
 o play_it()
Set the system up to playback the images.
 o post()
Get the post thread status.
 o post(boolean)
Set the status of the post thread.
 o readFlippersFile(String)
Set whether to read the flipper's location.
 o record()
Is the system to record the images.
 o record_it()
Set the system up to record the images.
 o refindFlippers()
Get the status of the refinding of the flippers.
 o refindFlippers(boolean)
Set the refind flippers status.
 o resetTime()
How long to leave a flipper up before reseting it.
 o resetTime(int)
Set how long to leave a flipper up before reseting it.
 o running()
Find the running status of the system.
 o running(boolean)
Set the running status of the system.
 o setArgs(String[])
Set the command line arguments.
 o setDataIO(DataIO)
Set the device for data IO.
 o setExit(PinballExit)
Set the object used to call when exiting the system.
 o setPlunger(Plunger)
Set the plunger in the system.
 o strategy()
Get the strategy thread status.
 o strategy(boolean)
Set the status of the strategy thread.
 o trace(String)
Used to force a line statement of where the program is up to.
 o verbose()
Find the verbose status.
 o verbose(boolean)
Set the verbose status.
 o writeFlippersFile()
Check whether to write the flipper's location.
 o writeFlippersFile(String)
Set the file to write the flipper's location.

Variables

 o post
 private static boolean post
Status should post analyze thread run.

 o analyze
 private static boolean analyze
Status should analyze thread run.

 o strategy
 private static boolean strategy
Status should strategy thread run.

 o display
 private static boolean display
Should the system display an image.

 o play
 private static boolean play
Play a game back.

 o record
 private static boolean record
Record a game.

 o pixelrate
 private static int pixelrate
Number of pixels to increment when scanning the image.

 o framerate
 private static int framerate
Display every nth frame on the screen.

 o buffersize
 private static int buffersize
Number of buffers in the system.

 o findFlippers
 private static int findFlippers
Number of trys the system uses to average the flipper positions.

 o verbose
 private static boolean verbose
Is the display in verbose mode. This displays what the system sees, the difference image.

 o resetTime
 private static int resetTime
How long from flipper up to the flipper is reset.

 o flipperThreshold
 private static int flipperThreshold
The hight from the flipper to the top the flipper test area. This is used to make the flipper zone; the area the ball passes through it twice to say it was hit.

 o flipperZone
 private static int flipperZone
The Y location for the top of the flipper zone.

 o flipperZoneSize
 private static int flipperZoneSize
The size of the flipper Zone.

 o moveThreshold
 private static int moveThreshold
The distance that a ball can move and still be considered a ball. This helps filter out noise.

 o pixelThreshold
 private static int pixelThreshold
The amount a pixel's index needs to change to be consided it changed.

 o flipperSpace
 private static int flipperSpace
The radius around the flipper that are to be ignored.

 o running
 private static boolean running
Flag to determine if the system is running.

 o debug
 private static int debug
The debug level for the program. Current levels are 0 1 2. The higher the number the more is listed. 0 is off.

 o ballMin
 private static int ballMin
The min size for the ball.

 o ballMax
 private static int ballMax
The max size for the ball.

 o ballOutOfPlay
 private static boolean ballOutOfPlay
Used to see if ball is out of play. Used by the out of play button to force the ball out of play if the system missed it going out.

 o writeFlippersFile
 private static boolean writeFlippersFile
Should the flipper's locations be saved to a file.

 o readFlippersFile
 private static boolean readFlippersFile
Should the flippers locations be read from a file.

 o flippersFile
 private static String flippersFile
Name of the flippers file.

 o flip
 private static FileInputStream flip
Used for the flippers file.

 o flipin
 private static DataInputStream flipin
Used for the flippers file.

 o flipto
 private static FileOutputStream flipto
Used for the flippers file.

 o flipout
 private static DataOutputStream flipout
Used for the flippers file.

 o locateFlippers
 private static boolean locateFlippers
Should the sytem locate the flippers. False if using file.

 o foundFlippers
 private static boolean foundFlippers
Have the flippers been found.

 o arguments
 private static String arguments[]
Command line arguments.

 o plunger
 private static Plunger plunger
Plunger for the system.

 o launchBall
 private static boolean launchBall
Should the ball be launched.

 o exitSystem
 private static PinballExit exitSystem
Used when exiting the system.

 o ballsToPlay
 private static int ballsToPlay
Number of ball's to play before ending.

 o ballInPlay
 private static int ballInPlay
Current ball in play.

 o logFileName
 private static String logFileName
Name of the log file.

 o dataPort
 private static String dataPort
Port used for data IO.

 o networkPort
 private static int networkPort
Port used for the network.

 o networkHost
 private static String networkHost
Network Host.

 o dataIO
 private static DataIO dataIO
The device used for data IO.

 o refindFlippers
 private static boolean refindFlippers
Refinding the flippers.

 o pause
 private static boolean pause
System is paused.

 o clientMode
 private static boolean clientMode
Client mode.

Constructors

 o GameOptions
 public GameOptions()

Methods

 o running
 public static void running(boolean o)
Set the running status of the system.

Parameters:
o - The running status.
 o running
 public static boolean running()
Find the running status of the system.

Returns:
running state.
 o strategy
 public static void strategy(boolean o)
Set the status of the strategy thread.

Parameters:
o - strategy thread status.
 o analyze
 public static void analyze(boolean o)
Set the status of the analyze thread.

Parameters:
o - analyze thread status.
 o post
 public static void post(boolean o)
Set the status of the post thread.

Parameters:
o - post thread status.
 o display
 public static boolean display()
Get the display status.

Returns:
The display status.
 o post
 public static boolean post()
Get the post thread status.

Returns:
The post thread status.
 o strategy
 public static boolean strategy()
Get the strategy thread status.

Returns:
The strategy thread status.
 o analyze
 public static boolean analyze()
Get the analyze thread status.

Returns:
The analyze thread status.
 o debug
 public static int debug()
The debug level. Current levels are 0 1 2. The lower the number the more is listed.

Returns:
The debug level.
 o play
 public static boolean play()
Is the system to playback the images.

Returns:
The play condition.
 o record
 public static boolean record()
Is the system to record the images.

Returns:
The record condition.
 o record_it
 public static void record_it()
Set the system up to record the images.

 o play_it
 public static void play_it()
Set the system up to playback the images.

 o verbose
 public static void verbose(boolean v)
Set the verbose status. This displays what the system sees, the difference image.

Parameters:
v - The status.
 o verbose
 public static boolean verbose()
Find the verbose status.

Returns:
The verbose status.
 o live
 public static void live()
Set the system into live mode. That doesn't record or playback images.

 o pixelRate
 public static int pixelRate()
Get the pixel rate for the system. Number of pixels to increment when scanning the image.

Returns:
The pixel rate of the system.
 o pixelRate
 public static void pixelRate(int p)
Set the pixel rate for the system.

Parameters:
p - pixel rate.
 o frameRate
 public static void frameRate(int f)
Setup the frame rate for the system. Display every nth frame on the screen.

Parameters:
f - the frame rate.
 o frameRate
 public static int frameRate()
Get the frame rate for the system.

Returns:
The frame rate.
 o bufferSize
 public static void bufferSize(int b)
Setup the number of buffers. Number of buffers in the system.

Parameters:
b - Buffer size.
 o bufferSize
 public static int bufferSize()
Get the buffer size for the sytem.

Returns:
The buffer size.
 o findFlippers
 public static int findFlippers()
Get the number of times to check the flippers.

Returns:
The number of times to check the flippers.
 o findFlippers
 public static void findFlippers(int f)
Set the number of times to check the flippers.

Parameters:
f - amount of checking to do.
 o resetTime
 public static int resetTime()
How long to leave a flipper up before reseting it.

Returns:
The reset time.
 o resetTime
 public static void resetTime(int t)
Set how long to leave a flipper up before reseting it.

Parameters:
The - time to leave a flipper up.
 o flipperZone
 public static void flipperZone(int f)
Set the flipper zone. The hight from the flipper to the top the flipper test area. This area is used to see if the ball passes through it twice it was hit.

Parameters:
f - Flipper zone location.
 o flipperZone
 public static int flipperZone()
Get the flipper zone. The Y location for the top of the flipper zone.

Returns:
The flipper zone location.
 o flipperThreshold
 public static int flipperThreshold()
Get the flipper threshold. The hight from the flipper to the top the flipper test area. This area is used to see if the ball passes through it twice it was hit.

Returns:
The flipper threshold.
 o moveThreshold
 public static int moveThreshold()
Get the move threshold. The distance that a ball can move and still be considered a ball. This helps filter out noise.

Returns:
The move threshold.
 o moveThreshold
 public static void moveThreshold(int amount)
Set the move threshold. The distance that a ball can move and still be considered a ball. This helps filter out noise.

Parameters:
amount - The move threshold value.
 o ballMin
 public static int ballMin()
Get the minimum size of a ball.

Returns:
The minimum size of a ball.
 o ballMin
 public static void ballMin(int min)
Set the minimum size of a ball.

Parameters:
min - The minimum size of a ball.
 o ballMax
 public static int ballMax()
Get the maximum size of a ball.

Returns:
The maximum size of a ball.
 o ballMax
 public static void ballMax(int max)
Set the maximum size of a ball.

Parameters:
max - The maximum size of a ball.
 o pixelThreshold
 public static int pixelThreshold()
Get the pixel threshold. The amount a pixel's index needs to change to be consided it changed.

Returns:
The pixel threshold.
 o pixelThreshold
 public static void pixelThreshold(int amount)
Set the pixel threshold. The amount a pixel's index needs to change to be consided it changed.

Parameters:
amount - The pixel threshold.
 o flipperZoneSize
 public static int flipperZoneSize()
Get the flipper zone size. The size of the area the ball passes through it twice to say it was hit.

Returns:
The size of the flipper zone.
 o flipperSpace
 public static int flipperSpace()
Get the radius around the flippers to ignore.

Returns:
The radius around the flippers to ignore.
 o flipperSpace
 public static void flipperSpace(int s)
Set the radius around the flippers to ignore.

Parameters:
s - The radius.
 o trace
 public static void trace(String s)
Used to force a line statement of where the program is up to.

 o ballOutOfPlay
 public static void ballOutOfPlay(boolean out)
Tell if the ball was forced out of play.

Parameters:
out - The out of play forced status.
 o ballOutOfPlay
 public static boolean ballOutOfPlay()
See if the ball was forced out of play

Returns:
ball's out of play status.
 o writeFlippersFile
 public static void writeFlippersFile(String file)
Set the file to write the flipper's location.

Parameters:
String - flipper file
 o writeFlippersFile
 public static boolean writeFlippersFile()
Check whether to write the flipper's location.

Returns:
b Write state
 o readFlippersFile
 public static void readFlippersFile(String file)
Set whether to read the flipper's location.

Parameters:
file - Flippers file
 o locateFlippers
 public static void locateFlippers(boolean f)
Set whether the system should find the location of the flippers.

Parameters:
flipper - location status.
 o locateFlippers
 public static boolean locateFlippers()
Should the system find the flippers?

Returns:
Whether the flippers should be found.
 o getFlippersFileRead
 public static DataInputStream getFlippersFileRead()
Get the flipper file for reading.

Returns:
flipper file
 o getFlippersFileWrite
 public static DataOutputStream getFlippersFileWrite()
Get the flipper file for writting.

Returns:
flipper file
 o foundFlippers
 public static void foundFlippers(boolean f)
Set the flipper's found status.

Parameters:
f - found flipper's status.
 o foundFlippers
 public static boolean foundFlippers()
Get the flipper's found status.

Returns:
the flipper's found status.
 o setArgs
 public static void setArgs(String args[])
Set the command line arguments.

Parameters:
args - the command line arguments.
 o getArgs
 public static String[] getArgs()
Get the command line arguments.

Returns:
the command line arguments.
 o setPlunger
 public static void setPlunger(Plunger p)
Set the plunger in the system.

Parameters:
p - the plunger in the system.
 o getPlunger
 public static Plunger getPlunger()
Get the plunger in the system.

Returns:
the plunger in the system.
 o launchBall
 public static void launchBall(boolean l)
Set the status of whether the system should launch the ball.

Parameters:
l - launch status.
 o launchBall
 public static boolean launchBall()
Get the status of whether the system should launch the ball.

Returns:
launch status.
 o setExit
 public static void setExit(PinballExit exit)
Set the object used to call when exiting the system.

Parameters:
exit - called when exiting the system.
 o exitSystem
 public static void exitSystem()
Exit the system.

 o ballsToPlay
 public static void ballsToPlay(int b)
Set the number of ball's to play before exiting.

Parameters:
b - balls to play.
 o ballsToPlay
 public static int ballsToPlay()
Get the number of balls to play.

Returns:
balls to play.
 o ballInPlay
 public static void ballInPlay(int b)
Set ball in play number.

Parameters:
b - number of ball in play.
 o ballInPlay
 public static int ballInPlay()
Get the number of the ball in play.

Returns:
number of ball in play.
 o logFileName
 public static void logFileName(String log)
Set the name of the log file for playback.

 o logFileName
 public static String logFileName()
Get the name of the log file.

Returns:
the log file's name.
 o dataPort
 public static String dataPort()
Get the port for data IO.

Returns:
the data port.
 o setDataIO
 public static void setDataIO(DataIO data)
Set the device for data IO.

Parameters:
data - the data IO device.
 o getDataIO
 public static DataIO getDataIO()
Get the device used for data IO.

Returns:
the data IO device.
 o refindFlippers
 public static void refindFlippers(boolean f)
Set the refind flippers status.

Parameters:
f - the status of refinding the flippers.
 o refindFlippers
 public static boolean refindFlippers()
Get the status of the refinding of the flippers.

Returns:
refind flippers status.
 o pause
 public static void pause(boolean p)
Set the pause state of the system.

Parameters:
p - the pause state.
 o pause
 public static boolean pause()
Get the pause state of the system

Returns:
the pause state.
 o clientMode
 public static void clientMode()
Set the system for client mode.

 o client
 public static boolean client()
Is the program running in client mode.

 o networkHost
 public static String networkHost()
Get the network host.

Returns:
network host name.
 o networkPort
 public static int networkPort()
Get the network port.

Returns:
network port number.

All Packages  Class Hierarchy  This Package  Previous  Next  Index