Skip to content

Sprite Level Description Class

Raluca D. Gaina edited this page Feb 12, 2018 · 1 revision

SLDescription class is the core of the rule generation in the framework. The class provides the generator with information about the game sprites and the current level. The generator can retrieve all the information needed using the following functions:

SLDescription class Description
SpriteData[] getGameSprites() Get a list of all different sprites defined to be used in the game.
String[][] getCurrentLevel() Get a 2D matrix of strings. This matrix represents the current game level. Each value is a comma separated string of all the different sprites in this tile position. (Note: all sprite names are encoded so don't rely on the name of sprites during the generation process)
StateObservation testRules(String[] rules, String[] wins) Compile the current rules and termination conditions and get a StateObservation object that can be used to simulate the game.
ArrayList<Message> getErrors() Get a list of all the errors and warning happens during the compilation or the running process.

Table of Contents:

Clone this wiki locally