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.
-
analyze
- Status should analyze thread run.
-
arguments
- Command line arguments.
-
ballInPlay
- Current ball in play.
-
ballMax
- The max size for the ball.
-
ballMin
- The min size for the ball.
-
ballOutOfPlay
-
Used to see if ball is out of play.
-
ballsToPlay
- Number of ball's to play before ending.
-
buffersize
- Number of buffers in the system.
-
clientMode
- Client mode.
-
dataIO
- The device used for data IO.
-
dataPort
- Port used for data IO.
-
debug
-
The debug level for the program.
-
display
- Should the system display an image.
-
exitSystem
- Used when exiting the system.
-
findFlippers
- Number of trys the system uses to average the flipper positions.
-
flip
- Used for the flippers file.
-
flipin
- Used for the flippers file.
-
flipout
- Used for the flippers file.
-
flippersFile
- Name of the flippers file.
-
flipperSpace
- The radius around the flipper that are to be ignored.
-
flipperThreshold
-
The hight from the flipper to the top the flipper test area.
-
flipperZone
- The Y location for the top of the flipper zone.
-
flipperZoneSize
- The size of the flipper Zone.
-
flipto
- Used for the flippers file.
-
foundFlippers
- Have the flippers been found.
-
framerate
- Display every nth frame on the screen.
-
launchBall
- Should the ball be launched.
-
locateFlippers
- Should the sytem locate the flippers.
-
logFileName
- Name of the log file.
-
moveThreshold
- The distance that a ball can move and still be considered a ball.
-
networkHost
- Network Host.
-
networkPort
- Port used for the network.
-
pause
- System is paused.
-
pixelrate
- Number of pixels to increment when scanning the image.
-
pixelThreshold
- The amount a pixel's index needs to change to be consided it changed.
-
play
- Play a game back.
-
plunger
- Plunger for the system.
-
post
- Status should post analyze thread run.
-
readFlippersFile
- Should the flippers locations be read from a file.
-
record
- Record a game.
-
refindFlippers
- Refinding the flippers.
-
resetTime
- How long from flipper up to the flipper is reset.
-
running
- Flag to determine if the system is running.
-
strategy
- Status should strategy thread run.
-
verbose
-
Is the display in verbose mode.
-
writeFlippersFile
- Should the flipper's locations be saved to a file.
-
GameOptions()
-
-
analyze()
- Get the analyze thread status.
-
analyze(boolean)
- Set the status of the analyze thread.
-
ballInPlay()
- Get the number of the ball in play.
-
ballInPlay(int)
- Set ball in play number.
-
ballMax()
- Get the maximum size of a ball.
-
ballMax(int)
- Set the maximum size of a ball.
-
ballMin()
- Get the minimum size of a ball.
-
ballMin(int)
- Set the minimum size of a ball.
-
ballOutOfPlay()
- See if the ball was forced out of play
-
ballOutOfPlay(boolean)
- Tell if the ball was forced out of play.
-
ballsToPlay()
-
Get the number of balls to play.
-
ballsToPlay(int)
- Set the number of ball's to play before exiting.
-
bufferSize()
- Get the buffer size for the sytem.
-
bufferSize(int)
- Setup the number of buffers.
-
client()
- Is the program running in client mode.
-
clientMode()
- Set the system for client mode.
-
dataPort()
- Get the port for data IO.
-
debug()
- The debug level.
-
display()
- Get the display status.
-
exitSystem()
-
Exit the system.
-
findFlippers()
- Get the number of times to check the flippers.
-
findFlippers(int)
- Set the number of times to check the flippers.
-
flipperSpace()
- Get the radius around the flippers to ignore.
-
flipperSpace(int)
- Set the radius around the flippers to ignore.
-
flipperThreshold()
- Get the flipper threshold.
-
flipperZone()
- Get the flipper zone.
-
flipperZone(int)
- Set the flipper zone.
-
flipperZoneSize()
- Get the flipper zone size.
-
foundFlippers()
- Get the flipper's found status.
-
foundFlippers(boolean)
- Set the flipper's found status.
-
frameRate()
- Get the frame rate for the system.
-
frameRate(int)
- Setup the frame rate for the system.
-
getArgs()
- Get the command line arguments.
-
getDataIO()
- Get the device used for data IO.
-
getFlippersFileRead()
- Get the flipper file for reading.
-
getFlippersFileWrite()
- Get the flipper file for writting.
-
getPlunger()
- Get the plunger in the system.
-
launchBall()
- Get the status of whether the system should launch the ball.
-
launchBall(boolean)
- Set the status of whether the system should launch the ball.
-
live()
- Set the system into live mode.
-
locateFlippers()
- Should the system find the flippers?
-
locateFlippers(boolean)
-
Set whether the system should find the location of the flippers.
-
logFileName()
- Get the name of the log file.
-
logFileName(String)
- Set the name of the log file for playback.
-
moveThreshold()
- Get the move threshold.
-
moveThreshold(int)
- Set the move threshold.
-
networkHost()
- Get the network host.
-
networkPort()
- Get the network port.
-
pause()
- Get the pause state of the system
-
pause(boolean)
- Set the pause state of the system.
-
pixelRate()
- Get the pixel rate for the system.
-
pixelRate(int)
-
Set the pixel rate for the system.
-
pixelThreshold()
- Get the pixel threshold.
-
pixelThreshold(int)
- Set the pixel threshold.
-
play()
- Is the system to playback the images.
-
play_it()
- Set the system up to playback the images.
-
post()
- Get the post thread status.
-
post(boolean)
- Set the status of the post thread.
-
readFlippersFile(String)
- Set whether to read the flipper's location.
-
record()
- Is the system to record the images.
-
record_it()
- Set the system up to record the images.
-
refindFlippers()
- Get the status of the refinding of the flippers.
-
refindFlippers(boolean)
- Set the refind flippers status.
-
resetTime()
- How long to leave a flipper up before reseting it.
-
resetTime(int)
- Set how long to leave a flipper up before reseting it.
-
running()
- Find the running status of the system.
-
running(boolean)
- Set the running status of the system.
-
setArgs(String[])
- Set the command line arguments.
-
setDataIO(DataIO)
- Set the device for data IO.
-
setExit(PinballExit)
- Set the object used to call when exiting the system.
-
setPlunger(Plunger)
- Set the plunger in the system.
-
strategy()
- Get the strategy thread status.
-
strategy(boolean)
- Set the status of the strategy thread.
-
trace(String)
-
Used to force a line statement of where the program is up to.
-
verbose()
- Find the verbose status.
-
verbose(boolean)
- Set the verbose status.
-
writeFlippersFile()
- Check whether to write the flipper's location.
-
writeFlippersFile(String)
- Set the file to write the flipper's location.
post
private static boolean post
- Status should post analyze thread run.
analyze
private static boolean analyze
- Status should analyze thread run.
strategy
private static boolean strategy
- Status should strategy thread run.
display
private static boolean display
- Should the system display an image.
play
private static boolean play
- Play a game back.
record
private static boolean record
- Record a game.
pixelrate
private static int pixelrate
- Number of pixels to increment when scanning the image.
framerate
private static int framerate
- Display every nth frame on the screen.
buffersize
private static int buffersize
- Number of buffers in the system.
findFlippers
private static int findFlippers
- Number of trys the system uses to average the flipper positions.
verbose
private static boolean verbose
- Is the display in verbose mode. This displays what the system sees,
the difference image.
resetTime
private static int resetTime
- How long from flipper up to the flipper is reset.
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.
flipperZone
private static int flipperZone
- The Y location for the top of the flipper zone.
flipperZoneSize
private static int flipperZoneSize
- The size of the flipper Zone.
moveThreshold
private static int moveThreshold
- The distance that a ball can move and still be considered a ball.
This helps filter out noise.
pixelThreshold
private static int pixelThreshold
- The amount a pixel's index needs to change to be consided it changed.
flipperSpace
private static int flipperSpace
- The radius around the flipper that are to be ignored.
running
private static boolean running
- Flag to determine if the system is running.
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.
ballMin
private static int ballMin
- The min size for the ball.
ballMax
private static int ballMax
- The max size for the ball.
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.
writeFlippersFile
private static boolean writeFlippersFile
- Should the flipper's locations be saved to a file.
readFlippersFile
private static boolean readFlippersFile
- Should the flippers locations be read from a file.
flippersFile
private static String flippersFile
- Name of the flippers file.
flip
private static FileInputStream flip
- Used for the flippers file.
flipin
private static DataInputStream flipin
- Used for the flippers file.
flipto
private static FileOutputStream flipto
- Used for the flippers file.
flipout
private static DataOutputStream flipout
- Used for the flippers file.
locateFlippers
private static boolean locateFlippers
- Should the sytem locate the flippers. False if using file.
foundFlippers
private static boolean foundFlippers
- Have the flippers been found.
arguments
private static String arguments[]
- Command line arguments.
plunger
private static Plunger plunger
- Plunger for the system.
launchBall
private static boolean launchBall
- Should the ball be launched.
exitSystem
private static PinballExit exitSystem
- Used when exiting the system.
ballsToPlay
private static int ballsToPlay
- Number of ball's to play before ending.
ballInPlay
private static int ballInPlay
- Current ball in play.
logFileName
private static String logFileName
- Name of the log file.
dataPort
private static String dataPort
- Port used for data IO.
networkPort
private static int networkPort
- Port used for the network.
networkHost
private static String networkHost
- Network Host.
dataIO
private static DataIO dataIO
- The device used for data IO.
refindFlippers
private static boolean refindFlippers
- Refinding the flippers.
pause
private static boolean pause
- System is paused.
clientMode
private static boolean clientMode
- Client mode.
GameOptions
public GameOptions()
running
public static void running(boolean o)
- Set the running status of the system.
- Parameters:
- o - The running status.
running
public static boolean running()
- Find the running status of the system.
- Returns:
- running state.
strategy
public static void strategy(boolean o)
- Set the status of the strategy thread.
- Parameters:
- o - strategy thread status.
analyze
public static void analyze(boolean o)
- Set the status of the analyze thread.
- Parameters:
- o - analyze thread status.
post
public static void post(boolean o)
- Set the status of the post thread.
- Parameters:
- o - post thread status.
display
public static boolean display()
- Get the display status.
- Returns:
- The display status.
post
public static boolean post()
- Get the post thread status.
- Returns:
- The post thread status.
strategy
public static boolean strategy()
- Get the strategy thread status.
- Returns:
- The strategy thread status.
analyze
public static boolean analyze()
- Get the analyze thread status.
- Returns:
- The analyze thread status.
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.
play
public static boolean play()
- Is the system to playback the images.
- Returns:
- The play condition.
record
public static boolean record()
- Is the system to record the images.
- Returns:
- The record condition.
record_it
public static void record_it()
- Set the system up to record the images.
play_it
public static void play_it()
- Set the system up to playback the images.
verbose
public static void verbose(boolean v)
- Set the verbose status.
This displays what the system sees, the difference image.
- Parameters:
- v - The status.
verbose
public static boolean verbose()
- Find the verbose status.
- Returns:
- The verbose status.
live
public static void live()
- Set the system into live mode. That doesn't record or playback images.
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.
pixelRate
public static void pixelRate(int p)
- Set the pixel rate for the system.
- Parameters:
- p - pixel rate.
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.
frameRate
public static int frameRate()
- Get the frame rate for the system.
- Returns:
- The frame rate.
bufferSize
public static void bufferSize(int b)
- Setup the number of buffers.
Number of buffers in the system.
- Parameters:
- b - Buffer size.
bufferSize
public static int bufferSize()
- Get the buffer size for the sytem.
- Returns:
- The buffer size.
findFlippers
public static int findFlippers()
- Get the number of times to check the flippers.
- Returns:
- The number of times to check the flippers.
findFlippers
public static void findFlippers(int f)
- Set the number of times to check the flippers.
- Parameters:
- f - amount of checking to do.
resetTime
public static int resetTime()
- How long to leave a flipper up before reseting it.
- Returns:
- The reset time.
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.
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.
flipperZone
public static int flipperZone()
- Get the flipper zone.
The Y location for the top of the flipper zone.
- Returns:
- The flipper zone location.
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.
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.
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.
ballMin
public static int ballMin()
- Get the minimum size of a ball.
- Returns:
- The minimum size of a ball.
ballMin
public static void ballMin(int min)
- Set the minimum size of a ball.
- Parameters:
- min - The minimum size of a ball.
ballMax
public static int ballMax()
- Get the maximum size of a ball.
- Returns:
- The maximum size of a ball.
ballMax
public static void ballMax(int max)
- Set the maximum size of a ball.
- Parameters:
- max - The maximum size of a ball.
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.
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.
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.
flipperSpace
public static int flipperSpace()
- Get the radius around the flippers to ignore.
- Returns:
- The radius around the flippers to ignore.
flipperSpace
public static void flipperSpace(int s)
- Set the radius around the flippers to ignore.
- Parameters:
- s - The radius.
trace
public static void trace(String s)
- Used to force a line statement of where the program is up to.
ballOutOfPlay
public static void ballOutOfPlay(boolean out)
- Tell if the ball was forced out of play.
- Parameters:
- out - The out of play forced status.
ballOutOfPlay
public static boolean ballOutOfPlay()
- See if the ball was forced out of play
- Returns:
- ball's out of play status.
writeFlippersFile
public static void writeFlippersFile(String file)
- Set the file to write the flipper's location.
- Parameters:
- String - flipper file
writeFlippersFile
public static boolean writeFlippersFile()
- Check whether to write the flipper's location.
- Returns:
- b Write state
readFlippersFile
public static void readFlippersFile(String file)
- Set whether to read the flipper's location.
- Parameters:
- file - Flippers file
locateFlippers
public static void locateFlippers(boolean f)
- Set whether the system should find the location of the flippers.
- Parameters:
- flipper - location status.
locateFlippers
public static boolean locateFlippers()
- Should the system find the flippers?
- Returns:
- Whether the flippers should be found.
getFlippersFileRead
public static DataInputStream getFlippersFileRead()
- Get the flipper file for reading.
- Returns:
- flipper file
getFlippersFileWrite
public static DataOutputStream getFlippersFileWrite()
- Get the flipper file for writting.
- Returns:
- flipper file
foundFlippers
public static void foundFlippers(boolean f)
- Set the flipper's found status.
- Parameters:
- f - found flipper's status.
foundFlippers
public static boolean foundFlippers()
- Get the flipper's found status.
- Returns:
- the flipper's found status.
setArgs
public static void setArgs(String args[])
- Set the command line arguments.
- Parameters:
- args - the command line arguments.
getArgs
public static String[] getArgs()
- Get the command line arguments.
- Returns:
- the command line arguments.
setPlunger
public static void setPlunger(Plunger p)
- Set the plunger in the system.
- Parameters:
- p - the plunger in the system.
getPlunger
public static Plunger getPlunger()
- Get the plunger in the system.
- Returns:
- the plunger in the system.
launchBall
public static void launchBall(boolean l)
- Set the status of whether the system should launch the ball.
- Parameters:
- l - launch status.
launchBall
public static boolean launchBall()
- Get the status of whether the system should launch the ball.
- Returns:
- launch status.
setExit
public static void setExit(PinballExit exit)
- Set the object used to call when exiting the system.
- Parameters:
- exit - called when exiting the system.
exitSystem
public static void exitSystem()
- Exit the system.
ballsToPlay
public static void ballsToPlay(int b)
- Set the number of ball's to play before exiting.
- Parameters:
- b - balls to play.
ballsToPlay
public static int ballsToPlay()
- Get the number of balls to play.
- Returns:
- balls to play.
ballInPlay
public static void ballInPlay(int b)
- Set ball in play number.
- Parameters:
- b - number of ball in play.
ballInPlay
public static int ballInPlay()
- Get the number of the ball in play.
- Returns:
- number of ball in play.
logFileName
public static void logFileName(String log)
- Set the name of the log file for playback.
logFileName
public static String logFileName()
- Get the name of the log file.
- Returns:
- the log file's name.
dataPort
public static String dataPort()
- Get the port for data IO.
- Returns:
- the data port.
setDataIO
public static void setDataIO(DataIO data)
- Set the device for data IO.
- Parameters:
- data - the data IO device.
getDataIO
public static DataIO getDataIO()
- Get the device used for data IO.
- Returns:
- the data IO device.
refindFlippers
public static void refindFlippers(boolean f)
- Set the refind flippers status.
- Parameters:
- f - the status of refinding the flippers.
refindFlippers
public static boolean refindFlippers()
- Get the status of the refinding of the flippers.
- Returns:
- refind flippers status.
pause
public static void pause(boolean p)
- Set the pause state of the system.
- Parameters:
- p - the pause state.
pause
public static boolean pause()
- Get the pause state of the system
- Returns:
- the pause state.
clientMode
public static void clientMode()
- Set the system for client mode.
client
public static boolean client()
- Is the program running in client mode.
networkHost
public static String networkHost()
- Get the network host.
- Returns:
- network host name.
networkPort
public static int networkPort()
- Get the network port.
- Returns:
- network port number.
All Packages Class Hierarchy This Package Previous Next Index