fr.umlv.botbattle
Interface ArenaInfo

All Superinterfaces:
BotContext.Info

public interface ArenaInfo
extends BotContext.Info

Arena informations.

Version:
1.0
Author:
remi
See Also:
BotContext.infoTypes(), BotContext.info(Class)

Method Summary
 int getArenaHeight()
          Returns the arena height
 String getArenaName()
          Returns the name of the arena
 int getArenaWidth()
          Returns the arena width.
 int getRadarSize()
          Returns the size of the radar.
 Map<? extends Position,ArenaItem> radar()
          Returns a snapshot of the items with their position near current bot.
 

Method Detail

getArenaWidth

int getArenaWidth()
Returns the arena width.

Returns:
the arena width in cells.

getArenaHeight

int getArenaHeight()
Returns the arena height

Returns:
the arena height in cells.

getArenaName

String getArenaName()
Returns the name of the arena

Returns:
the arena name.

getRadarSize

int getRadarSize()
Returns the size of the radar. By example, with size=1 the radar cover the square from (-1,-1) to (1,1) relative to the current bot position.

Returns:
the size of the cadar in cells.

radar

Map<? extends Position,ArenaItem> radar()
                                        throws DeadBotException
Returns a snapshot of the items with their position near current bot. Each items are stored in a map with their position relative to the position of the current bot. Example: an item with position (-1,0) is on the same line at the left of the bot. Implementation Note: At position (0,0), a FRIEND_BOT will never be reported. At other position if BOMB and ENEMY_BOT (resp. FRIEND_BOT) are on the same cell only an ENEMY_BOT (resp. FRIEND_BOT) will be reported. Futhermore, EMPTY items are not stored in the map.

Returns:
a read-only map containing a pairs of position and arena item.
Throws:
DeadBotException - if the current bot is dead.
See Also:
GameInfo.isAlive()