|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectGameplayLogManager
public class GameplayLogManager
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 |
---|
public GameplayLogManager()
Method Detail |
---|
public void layoutLog()
public java.util.Vector<java.lang.String> getActiveLog()
public void addEvent(java.lang.String event)
event
- A string representing the gameplay event in the formatpublic void checkCheat()
public void saveLog()
public void loadLog(java.io.File logFile)
logFile
- the log file to loadpublic void newLog()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |