cz.cuni.amis.pogamut.defcon.communication.worldview.modules.grid.flags
Interface IFlagChecker

Package class diagram package IFlagChecker
All Known Implementing Classes:
AbstractMapSource, BitmapMapSource, NativeMapSource

public interface IFlagChecker

Interface for the map sources. Provides access to map features and tracing methods.

Author:
Radek 'Black_Hand' Pibil

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.
 DefConLocation traceFromTo(DefConLocation start, DefConLocation end, BasicFlag flag)
          Returns the closest position to end from start, which has the proper flag.
 DefConLocation traceFromTo(DefConLocation start, DefConLocation end, BasicFlag flag, double distance)
          Returns the a position on line to end from start, which has the proper flag and is as far as possible, while closer than distance from the closest position.
 

Method Detail

hasFlag

boolean hasFlag(Location location,
                BasicFlag flag)
Returns true if the flag is present on the given location. Uses cached values.

Parameters:
location -
flag -
Returns:

hasFlag

boolean hasFlag(double x,
                double y,
                BasicFlag flag)
Returns true if the flag is present on the given location. Uses cached values.

Parameters:
x -
y -
flag -
Returns:

hasEnemyTerritoryFlag

boolean hasEnemyTerritoryFlag(Location location,
                              int enemyId)
Returns true if the given location is a valid territory for the given teamId.

Parameters:
location -
enemyId -
Returns:

hasEnemyTerritoryFlag

boolean hasEnemyTerritoryFlag(double x,
                              double y,
                              int enemyId)
Returns true if the given location is a valid territory for the given teamId.

Parameters:
x -
y -
enemyId -
Returns:

hasEnemyTerritoryFlag

boolean hasEnemyTerritoryFlag(Location location,
                              int enemyId,
                              boolean seaArea)
Returns true if the given location is a valid territory for the given teamId.

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

hasEnemyTerritoryFlag

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

traceFromTo

DefConLocation traceFromTo(DefConLocation start,
                           DefConLocation end,
                           BasicFlag flag)
Returns the closest position to end from start, which has the proper flag.

Parameters:
start -
end -
flag -
Returns:

traceFromTo

DefConLocation traceFromTo(DefConLocation start,
                           DefConLocation end,
                           BasicFlag flag,
                           double distance)
Returns the a position on line to end from start, which has the proper flag and is as far as possible, while closer than distance from the closest position.

Parameters:
start -
end -
flag -
distance -
Returns:


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