nl.tudelft.goal.unreal.messages
Class BotParameters

Package class diagram package BotParameters
java.lang.Object
  extended by cz.cuni.amis.pogamut.base.agent.params.impl.AgentParameters
      extended by cz.cuni.amis.pogamut.base.agent.params.impl.RemoteAgentParameters
          extended by cz.cuni.amis.pogamut.ut2004.agent.params.UT2004AgentParameters
              extended by cz.cuni.amis.pogamut.ut2004.bot.params.UT2004BotParameters
                  extended by nl.tudelft.goal.unreal.messages.Parameters
                      extended by nl.tudelft.goal.unreal.messages.BotParameters
All Implemented Interfaces:
cz.cuni.amis.pogamut.base.agent.params.IAgentParameters, cz.cuni.amis.pogamut.base.agent.params.IRemoteAgentParameters, cz.cuni.amis.pogamut.base.component.IComponent

public class BotParameters
extends Parameters
implements cz.cuni.amis.pogamut.base.component.IComponent

Holds parameters specific for the bot.

Also provides functionality to assign defaults to parameters that have not been assigned.

Author:
M.P. Korstanje

Field Summary
 
Fields inherited from class nl.tudelft.goal.unreal.messages.Parameters
BOT_SERVER_PORT, CONTROL_SERVER_PORT, DEFAULT_NAME, LOCAL_HOST, log
 
Constructor Summary
BotParameters(cz.cuni.amis.pogamut.base.utils.logging.IAgentLogger logger)
           
BotParameters(Map<String,eis.iilang.Parameter> parameters, cz.cuni.amis.pogamut.base.utils.logging.IAgentLogger logger)
           
BotParameters(Parameters defaults, cz.cuni.amis.pogamut.base.utils.logging.IAgentLogger logger)
           
 
Method Summary
 void assignDefaults(cz.cuni.amis.pogamut.base.agent.params.IAgentParameters defaults)
           
 cz.cuni.amis.utils.token.IToken getComponentId()
           
static BotParameters getDefaults(cz.cuni.amis.pogamut.base.utils.logging.IAgentLogger logger)
           
 Level getLogLevel()
           
 int getSkill()
           
 Skin getSkin()
           
 cz.cuni.amis.pogamut.base3d.worldview.object.Location getStartLocation()
           
 cz.cuni.amis.pogamut.base3d.worldview.object.Rotation getStartRotation()
           
protected  void setKey(Key key, eis.iilang.Parameter value)
           
 BotParameters setLogLevel(Level level)
           
 BotParameters setShouldLeadTarget(boolean shouldLeadTarget)
           
 BotParameters setSkill(int skill)
          Sets the bots skill between 0..7.
 BotParameters setSkin(Skin skin)
           
 BotParameters setStartLocation(cz.cuni.amis.pogamut.base3d.worldview.object.Location location)
           
 BotParameters setStartRotation(cz.cuni.amis.pogamut.base3d.worldview.object.Rotation rotation)
           
 BotParameters setTeam(Team team)
          Sets the bots preferred team.
 Boolean shouldLeadTarget()
           
 String toString()
           
 
Methods inherited from class nl.tudelft.goal.unreal.messages.Parameters
setAgentId, setAgentId, setWorldAddress, setWorldAddress
 
Methods inherited from class cz.cuni.amis.pogamut.ut2004.bot.params.UT2004BotParameters
getInitialLocation, getInitialRotation, getTeam, setInitialLocation, setInitialRotation, setTeam
 
Methods inherited from class cz.cuni.amis.pogamut.base.agent.params.impl.RemoteAgentParameters
getWorldAddress
 
Methods inherited from class cz.cuni.amis.pogamut.base.agent.params.impl.AgentParameters
getAgentId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface cz.cuni.amis.pogamut.base.agent.params.IAgentParameters
getAgentId
 

Constructor Detail

BotParameters

public BotParameters(cz.cuni.amis.pogamut.base.utils.logging.IAgentLogger logger)

BotParameters

public BotParameters(Map<String,eis.iilang.Parameter> parameters,
                     cz.cuni.amis.pogamut.base.utils.logging.IAgentLogger logger)
              throws UnrealEnvironmentException
Throws:
UnrealEnvironmentException

BotParameters

public BotParameters(Parameters defaults,
                     cz.cuni.amis.pogamut.base.utils.logging.IAgentLogger logger)
Method Detail

assignDefaults

public void assignDefaults(cz.cuni.amis.pogamut.base.agent.params.IAgentParameters defaults)
Specified by:
assignDefaults in interface cz.cuni.amis.pogamut.base.agent.params.IAgentParameters
Overrides:
assignDefaults in class Parameters

getComponentId

public cz.cuni.amis.utils.token.IToken getComponentId()
Specified by:
getComponentId in interface cz.cuni.amis.pogamut.base.component.IComponent

getLogLevel

public Level getLogLevel()

getSkill

public int getSkill()

getSkin

public Skin getSkin()

setLogLevel

public BotParameters setLogLevel(Level level)

setShouldLeadTarget

public BotParameters setShouldLeadTarget(boolean shouldLeadTarget)

setSkill

public BotParameters setSkill(int skill)
Sets the bots skill between 0..7. The bots skill only influences the bots accuracy. Values outside the valid range are clamped.

Parameters:
skill - an integer in the range 0..7

setSkin

public BotParameters setSkin(Skin skin)

setTeam

public BotParameters setTeam(Team team)
Sets the bots preferred team. Typically teams are either 0 or 1.

Parameters:
team -

setStartLocation

public BotParameters setStartLocation(cz.cuni.amis.pogamut.base3d.worldview.object.Location location)

setStartRotation

public BotParameters setStartRotation(cz.cuni.amis.pogamut.base3d.worldview.object.Rotation rotation)

shouldLeadTarget

public Boolean shouldLeadTarget()

getStartLocation

public cz.cuni.amis.pogamut.base3d.worldview.object.Location getStartLocation()

toString

public String toString()
Overrides:
toString in class Object

setKey

protected void setKey(Key key,
                      eis.iilang.Parameter value)
               throws nl.tudelft.goal.EIS2Java.exception.TranslationException
Specified by:
setKey in class Parameters
Throws:
nl.tudelft.goal.EIS2Java.exception.TranslationException

getDefaults

public static BotParameters getDefaults(cz.cuni.amis.pogamut.base.utils.logging.IAgentLogger logger)

getStartRotation

public cz.cuni.amis.pogamut.base3d.worldview.object.Rotation getStartRotation()


Copyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.