cz.cuni.amis.pogamut.unreal.server
Interface IUnrealServer<BOT extends IUnrealBot>

Package class diagram package IUnrealServer
All Superinterfaces:
IAgent, IComponent, IComponentAware, IControllable, IGhostAgent, IObservingAgent, IWorldAgentsObserver<BOT>, IWorldServer<BOT>

public interface IUnrealServer<BOT extends IUnrealBot>
extends IWorldServer<BOT>, IGhostAgent


Method Summary
 void connectNativeBot(String botName, String botType)
          Connects a UT native bot to the current map.
 Collection<? extends IMapList> getAvailableMaps()
           
 cz.cuni.amis.utils.flag.Flag<Double> getGameSpeedFlag()
          The flag raises events even when the game speed was changed by another UTServer instance or directly in game.
 IUnrealMap getMap()
          Get current map from the server
 String getMapName()
           
 List<? extends IMutator> getMutators()
          Reeturns list of all mutators available on the server.
 cz.cuni.amis.utils.collections.ObservableCollection<? extends IUnrealBot> getNativeAgents()
          Returns list of all non pogamut players connected to the game server.
 cz.cuni.amis.utils.collections.ObservableCollection<? extends IPlayer> getPlayers()
          Returns list of all players connected to the game server.
 void setAddress(String host, int port)
          Sets the address of the server to different location - does not automatically reconnect, use IUT2004Server#stop() and IUT2004Server#start().
 Future<Boolean> setGameMap(String map)
          Method that initiates map-change.
 
Methods inherited from interface cz.cuni.amis.pogamut.base.server.IWorldServer
getWorldAddress
 
Methods inherited from interface cz.cuni.amis.pogamut.base.server.IWorldAgentsObserver
getAgents
 
Methods inherited from interface cz.cuni.amis.pogamut.base.agent.IGhostAgent
getAct
 
Methods inherited from interface cz.cuni.amis.pogamut.base.agent.IObservingAgent
getWorldView
 
Methods inherited from interface cz.cuni.amis.pogamut.base.agent.IAgent
getComponentId, getIntrospection, getLogger, getName, getState, kill, pause, resume, start, startPaused, stop
 
Methods inherited from interface cz.cuni.amis.pogamut.base.component.IComponentAware
getEventBus
 

Method Detail

setAddress

void setAddress(String host,
                int port)
Sets the address of the server to different location - does not automatically reconnect, use IUT2004Server#stop() and IUT2004Server#start().

Parameters:
address -

getAvailableMaps

Collection<? extends IMapList> getAvailableMaps()
Returns:
List of all maps available on the UT server

getGameSpeedFlag

cz.cuni.amis.utils.flag.Flag<Double> getGameSpeedFlag()
The flag raises events even when the game speed was changed by another UTServer instance or directly in game.

Returns:
Speed of the game.

getMapName

String getMapName()
Returns:
Name of the current map.

setGameMap

Future<Boolean> setGameMap(String map)
                           throws MapChangeException
Method that initiates map-change. It returns future that describes the result.

Note that the object must restart itself in order to reconnect to the new server.

Parameters:
map -
Throws:
MapChangeException

getPlayers

cz.cuni.amis.utils.collections.ObservableCollection<? extends IPlayer> getPlayers()
Returns list of all players connected to the game server. The difference compared to the getAgents() method is that this method can return even the native bots, human players etc.

Returns:
List of all players on the server.

getNativeAgents

cz.cuni.amis.utils.collections.ObservableCollection<? extends IUnrealBot> getNativeAgents()
Returns list of all non pogamut players connected to the game server. Collection contains NativeBotAdapter classes, this means that you can deal with the players like with Pogamut agents.

Returns:
List of all players on the server.

getMutators

List<? extends IMutator> getMutators()
Reeturns list of all mutators available on the server. Mutators can be used to modify the game (eg. disable weapons, change game speed).

Returns:
List of all mutators available on the server.

connectNativeBot

void connectNativeBot(String botName,
                      String botType)
Connects a UT native bot to the current map.

Parameters:
botName -

getMap

IUnrealMap getMap()
Get current map from the server

Returns:
Map of current level.


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