|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.princeton.repeatedgames.rgsolve.utilities.RGSolveIO
public class RGSolveIO
This class contains IO methods for saving and opening files
Nested Class Summary | |
---|---|
static class |
RGSolveIO.OpenGameReturnObject
Contains a StageGame object and its title/name and extension |
static class |
RGSolveIO.SpecialFileFilter
This class is used for extracting the extensions from files so that they can be opened/parsed properly by rgsolve |
Field Summary | |
---|---|
static java.lang.String |
FILE_SEPARATOR
The file separator on this system |
static java.lang.String |
GAMES_FOLDER
The default location of saved games |
static java.lang.String[] |
IO_game_options
|
static java.lang.String[] |
IO_game_options_user_code
|
static java.lang.String |
OUTPUT_FOLDER
the default location of text output or graph output |
static java.lang.String |
SOLN_FOLDER
The default location of game solutions |
Constructor Summary | |
---|---|
RGSolveIO()
|
Method Summary | |
---|---|
static RGSolveIO.OpenGameReturnObject |
openSavedGame()
Open a saved game in the formats .txt, .rgm, .gmcode or .mat |
static RGSolution |
openSolution()
This method opens and instantiates a serialized RGSolution
object |
static boolean |
saveSolution(RGSolution rgsro)
This method serializes and saves an RGSolution
object |
static java.lang.String |
writeGameFile(Game gm,
java.lang.String file_title)
This methods and saves game files as - .rgm (serialized games). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String FILE_SEPARATOR
public static final java.lang.String GAMES_FOLDER
public static final java.lang.String SOLN_FOLDER
public static final java.lang.String OUTPUT_FOLDER
public static java.lang.String[] IO_game_options
public static java.lang.String[] IO_game_options_user_code
Constructor Detail |
---|
public RGSolveIO()
Method Detail |
---|
public static java.lang.String writeGameFile(Game gm, java.lang.String file_title)
.rgm
(serialized games).
- .mat (access database, readable in matlab).
- .txt (text files).
- .gmcode (special format for storing source from user-defined rules).
- Parameters:
gm
- the game to be savedfile_title
- the title of the game that is passed in
- Returns:
- the title of the saved game
public static RGSolveIO.OpenGameReturnObject openSavedGame()
public static RGSolution openSolution()
RGSolution
object
public static boolean saveSolution(RGSolution rgsro)
RGSolution
object
rgsro
- solution to save
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |