public class GameDescription
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
GameDescription.InteractionData
Simple data class represents the interaction between game sprites
|
static class |
GameDescription.SpriteData
Simple data class represents all game sprites
|
static class |
GameDescription.TerminationData
Simple data class represents all game termination conditions
|
Constructor and Description |
---|
GameDescription(Game currentGame)
Constructor to the Game Description.
|
Modifier and Type | Method and Description |
---|---|
void |
enableLogger(boolean value)
Disable/Enable the logger
|
java.util.ArrayList<GameDescription.SpriteData> |
getAllSpriteData()
Get all defined game sprites
|
java.util.ArrayList<Types.ACTIONS> |
getAvailableActions(boolean includeNIL)
Get player supported actions
|
java.util.ArrayList<GameDescription.SpriteData> |
getAvatar()
Get avatar sprite data information
|
java.util.ArrayList<Message> |
getErrors()
get list of errors from the system
|
java.util.ArrayList<GameDescription.InteractionData> |
getInteraction(java.lang.String stype1,
java.lang.String stype2)
Get a list of all effects happening to the first sprite
|
java.util.HashMap<java.lang.Character,java.util.ArrayList<java.lang.String>> |
getLevelMapping()
Get default character mapping
|
java.util.ArrayList<GameDescription.SpriteData> |
getMoving()
Get all movable sprites
|
java.util.ArrayList<GameDescription.SpriteData> |
getNPC()
Get NPCs sprite data information
|
java.util.ArrayList<GameDescription.SpriteData> |
getPortal()
Get Portals sprite data information
|
java.util.ArrayList<GameDescription.SpriteData> |
getResource()
Get Resources sprite data information
|
java.util.ArrayList<GameDescription.SpriteData> |
getStatic()
Get Statics sprite data information
|
java.util.ArrayList<GameDescription.TerminationData> |
getTerminationConditions()
Get a list of all termination conditions for the current game
|
java.util.ArrayList<Message> |
getWarnings()
get list of warnings from the system
|
void |
reset(Game currentGame)
Reset the game description object and assign new game object
|
StateObservation |
testLevel(java.lang.String level)
Build the generated level to be tested using an agent using the original
Level Mapping.
|
StateObservation |
testLevel(java.lang.String level,
java.util.HashMap<java.lang.Character,java.util.ArrayList<java.lang.String>> charMapping)
Build the generated level to be tested using an agent.
|
public GameDescription(Game currentGame)
currentGame
- The current running game object.public void reset(Game currentGame)
currentGame
- new game object assignedpublic StateObservation testLevel(java.lang.String level)
level
- a string of characters that are supplied in the character
mappingpublic StateObservation testLevel(java.lang.String level, java.util.HashMap<java.lang.Character,java.util.ArrayList<java.lang.String>> charMapping)
level
- a string of characters that are supplied in the character
mappingpublic void enableLogger(boolean value)
value
- enable or disablepublic java.util.ArrayList<Message> getErrors()
public java.util.ArrayList<Message> getWarnings()
public java.util.ArrayList<Types.ACTIONS> getAvailableActions(boolean includeNIL)
includeNIL
- boolean to identify if the NIL action should exists in the
supported actionspublic java.util.ArrayList<GameDescription.SpriteData> getAvatar()
public java.util.ArrayList<GameDescription.SpriteData> getNPC()
public java.util.ArrayList<GameDescription.SpriteData> getStatic()
public java.util.ArrayList<GameDescription.SpriteData> getResource()
public java.util.ArrayList<GameDescription.SpriteData> getPortal()
public java.util.ArrayList<GameDescription.SpriteData> getMoving()
public java.util.ArrayList<GameDescription.SpriteData> getAllSpriteData()
public java.util.ArrayList<GameDescription.InteractionData> getInteraction(java.lang.String stype1, java.lang.String stype2)
stype1
- the sprite name of the first sprite in the collisionstype2
- the sprite name of the second sprite in the collisionpublic java.util.ArrayList<GameDescription.TerminationData> getTerminationConditions()
public java.util.HashMap<java.lang.Character,java.util.ArrayList<java.lang.String>> getLevelMapping()