cz.cuni.amis.pogamut.defcon.communication.worldview
Class NativeMapSource

Package class diagram package NativeMapSource
java.lang.Object
  extended by cz.cuni.amis.pogamut.defcon.communication.worldview.AbstractMapSource
      extended by cz.cuni.amis.pogamut.defcon.communication.worldview.NativeMapSource
All Implemented Interfaces:
IFlagChecker

public class NativeMapSource
extends AbstractMapSource

Uses ingame representation of to provide info about it.

Author:
Radek 'Black_Hand' Pibil

Field Summary
 
Fields inherited from class cz.cuni.amis.pogamut.defcon.communication.worldview.AbstractMapSource
STEP
 
Constructor Summary
NativeMapSource(GameInfo gameInfo)
           
NativeMapSource(GameInfo gameInfo, Logger log)
           
 
Method Summary
 boolean hasEnemyTerritoryFlag(double x, double y, int enemyId)
          Returns true if the given location is a valid territory for the given teamId.
 boolean hasEnemyTerritoryFlag(double x, double y, int enemyId, boolean seaArea)
           
 boolean hasEnemyTerritoryFlag(Location location, int enemyId)
          Returns true if the given location is a valid territory for the given teamId.
 boolean hasEnemyTerritoryFlag(Location location, int enemyId, boolean seaArea)
          Returns true if the given location is a valid territory for the given teamId.
 boolean hasFlag(double x, double y, BasicFlag flag)
          Returns true if the flag is present on the given location.
 boolean hasFlag(Location location, BasicFlag flag)
          Returns true if the flag is present on the given location.
 
Methods inherited from class cz.cuni.amis.pogamut.defcon.communication.worldview.AbstractMapSource
traceFromTo, traceFromTo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NativeMapSource

public NativeMapSource(GameInfo gameInfo)

NativeMapSource

public NativeMapSource(GameInfo gameInfo,
                       Logger log)
Method Detail

hasFlag

public boolean hasFlag(Location location,
                       BasicFlag flag)
Description copied from interface: IFlagChecker
Returns true if the flag is present on the given location. Uses cached values.

Returns:

hasFlag

public boolean hasFlag(double x,
                       double y,
                       BasicFlag flag)
Description copied from interface: IFlagChecker
Returns true if the flag is present on the given location. Uses cached values.

Returns:

hasEnemyTerritoryFlag

public boolean hasEnemyTerritoryFlag(Location location,
                                     int enemyId)
Description copied from interface: IFlagChecker
Returns true if the given location is a valid territory for the given teamId.

Returns:

hasEnemyTerritoryFlag

public boolean hasEnemyTerritoryFlag(double x,
                                     double y,
                                     int enemyId)
Description copied from interface: IFlagChecker
Returns true if the given location is a valid territory for the given teamId.

Returns:

hasEnemyTerritoryFlag

public boolean hasEnemyTerritoryFlag(Location location,
                                     int enemyId,
                                     boolean seaArea)
Description copied from interface: IFlagChecker
Returns true if the given location is a valid territory for the given teamId.

seaArea - if true then checks, whether [x, y] is a sea territory
Returns:

hasEnemyTerritoryFlag

public boolean hasEnemyTerritoryFlag(double x,
                                     double y,
                                     int enemyId,
                                     boolean seaArea)


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