fr.umlv.botbattle
Interface Bot


public interface Bot

Represents one bot for the game. All classes that implement a Bot :

  1. required a public default constructor.
  2. required an annotation BotImage representing the image of the bot.
  3. permits an annotation BotNumber that specify the preferred number of bot of the same army.
All the methods of the Bot interface are called by the game during the lifecycle of a bot :
  1. init called with a context during the initialisation of the bot.
  2. run called once by the game on the thread associated to the bot.
  3. destroy called by the game when the bot die. This call may occured when the bot run.
The bot context is a facade of the game that the bot used to ask some informations or to act on the arena.

Version:
1.0
Author:
remi

Method Summary
 void destroy()
          Called by the game to indicated that the current bot is dead.
 void init(BotContext context)
          Called by the game to initialise a bot with the context.
 void run()
          Called by the game in a bot specific thread.
 

Method Detail

init

void init(BotContext context)
Called by the game to initialise a bot with the context. When this method is called all bots of a familly are already created.

Parameters:
context - facade object that permit interaction between the current bot and the game.

run

void run()
Called by the game in a bot specific thread. This method is called once.


destroy

void destroy()
Called by the game to indicated that the current bot is dead.