public class SLDescription
extends java.lang.Object
Constructor and Description |
---|
SLDescription(Game currentGame,
java.lang.String[] level,
int shift)
constructor for the SLDescription contains information about game sprites
and the current level
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
decodeName(java.lang.String value,
int seed)
decode the sprite name
|
void |
enableLogger(boolean value)
Disable/Enable the logger
|
java.lang.String[][] |
getCurrentLevel()
Return the current level as a comma separated 2D Array
|
java.util.ArrayList<Message> |
getErrors()
get list of errors from the system
|
GameDescription.SpriteData[] |
getGameSprites()
get an array of game sprites
|
java.util.ArrayList<Message> |
getWarnings()
get list of warnings from the system
|
java.lang.String[][] |
modifyRules(java.lang.String[] rules,
java.lang.String[] wins,
int seed)
Decode the rules and strings based on the seed
|
void |
reset(Game currentGame,
java.lang.String[] level)
reset the current variables to a new current game and level
|
StateObservation |
testRules(java.lang.String[] rules,
java.lang.String[] wins)
get state observation based on the interaction rules and termination
conditions
|
StateObservation |
testRules(java.lang.String[] rules,
java.lang.String[] wins,
java.util.HashMap<java.lang.String,java.util.ArrayList<java.lang.String>> spriteSetStructure)
get state observation based on the interaction rules and termination
conditions
|
public SLDescription(Game currentGame, java.lang.String[] level, int shift) throws java.lang.Exception
currentGame
- the current gamelevel
- the current levelshift
- random seed to encode the spritesjava.lang.Exception
- if the level is emptypublic void reset(Game currentGame, java.lang.String[] level) throws java.lang.Exception
currentGame
- the new gamelevel
- the new leveljava.lang.Exception
- if the level is emptypublic java.lang.String decodeName(java.lang.String value, int seed)
value
- current encoded sprite namepublic GameDescription.SpriteData[] getGameSprites()
public java.lang.String[][] getCurrentLevel()
public java.lang.String[][] modifyRules(java.lang.String[] rules, java.lang.String[] wins, int seed)
rules
- current interaction rules to decodewins
- current termination rules to decodeseed
- current encoding seedpublic StateObservation testRules(java.lang.String[] rules, java.lang.String[] wins)
rules
- current interaction ruleswins
- current termination conditionsspriteSetStructure
- current sprite set hierarchypublic StateObservation testRules(java.lang.String[] rules, java.lang.String[] wins, java.util.HashMap<java.lang.String,java.util.ArrayList<java.lang.String>> spriteSetStructure)
rules
- current interaction ruleswins
- current termination conditionsspriteSetStructure
- current sprite set hierarchypublic void enableLogger(boolean value)
value
- enable or disablepublic java.util.ArrayList<Message> getErrors()
public java.util.ArrayList<Message> getWarnings()