All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class pinball.PinballLog

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

public class PinballLog
extends Object
Used to keep track of what goes on in the game.


Constructor Index

 o PinballLog()

Method Index

 o closeUp()
Writes the header and information of the ball currently in play.
 o headerInfo(String, Object)
Add info to the header.
 o newBall()
Set the log file for a new ball.
 o print(String)
Write the log info on the current line.
 o setPath(String, boolean)
Set the path of the log file.
 o setStatsFile(String, int)
Set the statistics file and priority.
 o videoLogFileName()
Get the name of the videoLogFile.
 o write(int, String, int, Object)
Write the log info on the current line.
 o writeln(int, String, int, Object)
Write the log info on a new line.

Constructors

 o PinballLog
 public PinballLog()

Methods

 o setPath
 public static void setPath(String filePath,
                            boolean video)
Set the path of the log file.

Parameters:
filePath - the path of the file.
video - should the video be recorded as well.
 o setStatsFile
 public static void setStatsFile(String info,
                                 int priority)
Set the statistics file and priority.

Parameters:
info - the name of the stradegy.
priority - the max level priority to go through.
 o newBall
 public static synchronized void newBall()
Set the log file for a new ball.

 o videoLogFileName
 public static String videoLogFileName()
Get the name of the videoLogFile.

 o writeln
 public static synchronized void writeln(int frame,
                                         String info,
                                         int level,
                                         Object called)
Write the log info on a new line.

Parameters:
frame - frame number.
info - The data to write to the log.
level - The priority level for this data.
object - caller of the method.
 o write
 public static synchronized void write(int frame,
                                       String info,
                                       int level,
                                       Object called)
Write the log info on the current line.

Parameters:
frame - frame number.
info - The data to write to the log.
level - The priority level for this data.
object - caller of the method.
 o print
 public static synchronized void print(String info)
Write the log info on the current line.

Parameters:
info - The data to write to the log.
 o headerInfo
 public static void headerInfo(String s,
                               Object called)
Add info to the header.

Parameters:
s - String to add to the header.
object - caller of the method.
 o closeUp
 public static void closeUp()
Writes the header and information of the ball currently in play. Called when exiting the system.


All Packages  Class Hierarchy  This Package  Previous  Next  Index