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.


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 batchMode()
Is the program in batch mode.
 o batchMode(boolean)
Set the batch mode.
 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 dataPort(String)
Set 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 flipperAdjust()
Get the flipper adjust value.
 o flipperAdjust(double)
Set the percent to adjust 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 getCameraOffset()
Get the cameraOffset.
 o getCameraSize()
Get the cameraSize.
 o getCameraTransfer()
Get the cameraTransfer.
 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 logChange()
Set if the log file should change to a new ball.
 o logChange(boolean)
Set if the log file should change to a new ball.
 o logFileName()
Get the name of the log file.
 o logFileName(String)
Set the name of the log file for playback.
 o menu()
Get the main menu
 o menu(MainMenu)
Set the main menu.
 o moveThreshold()
Get the move threshold.
 o moveThreshold(int)
Set the move threshold.
 o networkHost()
Get the network host.
 o networkHost(String)
Set the network host.
 o networkPort()
Get the network port.
 o networkPort(int)
Set 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 setCameraOffset(int, int)
Set the cameraOffset.
 o setCameraSize(int, int)
Set the cameraSize.
 o setCameraTransfer(int)
Set the cameraOffset.
 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 timeToPlay()
Get the time to play.
 o timeToPlay(int)
Set the time to play before exiting.
 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.

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 timeToPlay
 public static void timeToPlay(int t)
Set the time to play before exiting.

Parameters:
t - time to play.
 o timeToPlay
 public static int timeToPlay()
Get the time to play.

Returns:
time 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.

Parameters:
log - the log file used.
 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 dataPort
 public static void dataPort(String data)
Set the port for data IO.

Parameters:
data - 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 batchMode
 public static void batchMode(boolean batch)
Set the batch mode.

Parameters:
batch - Is the system in batch mode.
 o batchMode
 public static boolean batchMode()
Is the program in batch mode.

 o networkHost
 public static void networkHost(String host)
Set the network host.

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

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

Parameters:
port - network port number.
 o networkPort
 public static int networkPort()
Get the network port.

Returns:
network port number.
 o setCameraSize
 public static void setCameraSize(int x,
                                  int y)
Set the cameraSize.

Parameters:
x - width.
y - height.
 o setCameraOffset
 public static void setCameraOffset(int x,
                                    int y)
Set the cameraOffset.

Parameters:
x - xoffset.
y - yoffset.
 o setCameraTransfer
 public static void setCameraTransfer(int t)
Set the cameraOffset.

Parameters:
t - transfer.
 o getCameraSize
 public static Point getCameraSize()
Get the cameraSize.

Returns:
cameraSize.
 o getCameraOffset
 public static Point getCameraOffset()
Get the cameraOffset.

Returns:
cameraOffset.
 o getCameraTransfer
 public static int getCameraTransfer()
Get the cameraTransfer.

Returns:
cameraTransfer.
 o logChange
 public static boolean logChange()
Set if the log file should change to a new ball.

Returns:
logChange status.
 o logChange
 public static void logChange(boolean l)
Set if the log file should change to a new ball.

Parameters:
l - should the log file should change to a new ball.
 o flipperAdjust
 public static void flipperAdjust(double a)
Set the percent to adjust the flippers.

Parameters:
a - adjust value.
 o flipperAdjust
 public static double flipperAdjust()
Get the flipper adjust value.

Returns:
the flipper adust value.
 o menu
 public static MainMenu menu()
Get the main menu

Returns:
the main menu.
 o menu
 public static void menu(MainMenu m)
Set the main menu.

Parameters:
the - menu of the system.

All Packages  Class Hierarchy  This Package  Previous  Next  Index