Class Tiles
java.lang.Object
ch.idsia.agents.controllers.modules.Tiles
public class Tiles
extends java.lang.Object
A 
Tiles object provides information about tiles around Mario.
 In methods in this class, (mapX, mapY) are tile coordinates in the receptive field. In these coordinates, (0,0) is at the upper-left corner of the receptive field.
(relMapX, relMapY) are tile coordinates relative to Mario. In these coordinates, (0, 0) is Mario's position.
- 
Field Summary
- 
Constructor SummaryConstructors Constructor Description Tiles()
- 
Method SummaryModifier and Type Method Description booleananyTile(int relMapX, int relMapY)Return true if there is any tile at (relMapX, relMapY) relative to Mario.booleanbrick(int relMapX, int relMapY)Return true if (relMapX, relMapY) contains a brick, a flowerpot or a cannon.booleanemptyTile(int relMapX, int relMapY)Return true if there is no tile at (relMapX, relMapY) relative to Mario.TilegetTile(int mapX, int mapY)Return the tile at (mapX, mapY) in the receptive field.voidreset(AgentOptions options)Tiletile(int relMapX, int relMapY)Return the tile at (relMapX, relMapY) relative to Mario.
- 
Field Details- 
tileFieldA 2-dimensional array of tiles (terrain and coins) in the receptive field.Tiles are indexed by row, then column: tileField[mapY, mapX] is the tile at (mapX, mapY). This array is #receptiveFieldHeightx#receptiveFieldWidthin size.
 
- 
- 
Constructor Details- 
Tilespublic Tiles()
 
- 
- 
Method Details- 
reset
- 
getTileReturn the tile at (mapX, mapY) in the receptive field.
- 
tileReturn the tile at (relMapX, relMapY) relative to Mario.
- 
emptyTilepublic boolean emptyTile(int relMapX, int relMapY)Return true if there is no tile at (relMapX, relMapY) relative to Mario.
- 
anyTilepublic boolean anyTile(int relMapX, int relMapY)Return true if there is any tile at (relMapX, relMapY) relative to Mario.
- 
brickpublic boolean brick(int relMapX, int relMapY)Return true if (relMapX, relMapY) contains a brick, a flowerpot or a cannon.
 
-