Class GameplayLogManager

java.lang.Object
  extended by GameplayLogManager

public class GameplayLogManager
extends java.lang.Object

This class handles records of stratego games, in the form of a vector of strings


Constructor Summary
GameplayLogManager()
           
 
Method Summary
 void addEvent(java.lang.String event)
          This Method appends the given event to the active log
 void checkCheat()
          This Method checks if the most recent event was a cheat, and if so calls the appropriate cheat method(s)
 java.util.Vector<java.lang.String> getActiveLog()
          This Method returns a vector of strings containing every action performed by either player
 void layoutLog()
          This Method sets up the graphical representation of the gameplay log
 void loadLog(java.io.File logFile)
          This Method sets the active log to the given file, throwing a FileNotFound exception if it is not found, or a IOException if it is improperly formatted
 void newLog()
          This Method empties the current log file.
 void saveLog()
          This Method prompts the user for a file name then saves the log into it
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GameplayLogManager

public GameplayLogManager()
Method Detail

layoutLog

public void layoutLog()
This Method sets up the graphical representation of the gameplay log


getActiveLog

public java.util.Vector<java.lang.String> getActiveLog()
This Method returns a vector of strings containing every action performed by either player

Returns:
returns a vector of strings representing the gameplay log

addEvent

public void addEvent(java.lang.String event)
This Method appends the given event to the active log

Parameters:
event - A string representing the gameplay event in the format

checkCheat

public void checkCheat()
This Method checks if the most recent event was a cheat, and if so calls the appropriate cheat method(s)


saveLog

public void saveLog()
This Method prompts the user for a file name then saves the log into it


loadLog

public void loadLog(java.io.File logFile)
This Method sets the active log to the given file, throwing a FileNotFound exception if it is not found, or a IOException if it is improperly formatted

Parameters:
logFile - the log file to load

newLog

public void newLog()
This Method empties the current log file.