gecco.server.visibility
Interface VisibilityInfo
- All Known Implementing Classes:
- VisibilityManager
- public interface VisibilityInfo
Description of the Class
- Author:
- Karl Hasselström, Henrik Hägerström
Method Summary |
boolean |
canSeeAutomaton(String role,
int x,
int y,
Unit excludeUnit)
Determines if at least one unit of which the given role is an
observer can see the given automaton, not counting the given
unit. |
boolean |
canSeePosition(String role,
double x,
double y)
Determines if at least one unit of which the given role is an
observer can see the given position. |
boolean |
canSeeUnit(String role,
Unit unit,
Unit excludeUnit)
Determines if at least one unit of which the given role is an
observer can see the given unit. |
canSeePosition
public boolean canSeePosition(String role,
double x,
double y)
- Determines if at least one unit of which the given role is an
observer can see the given position.
- Parameters:
role
- The role.x
- The X coordinate of the position.y
- The Y coordinate of the position.- Returns:
- true if the position can be seen, false otherwise.
canSeeAutomaton
public boolean canSeeAutomaton(String role,
int x,
int y,
Unit excludeUnit)
- Determines if at least one unit of which the given role is an
observer can see the given automaton, not counting the given
unit. You can set excludeUnit to null if you don't want to
exclude any unit.
- Parameters:
role
- The role.x
- The X coordinate of the automaton.y
- The Y coordinate of the automaton.excludeUnit
- Don't count this unit (may be null).- Returns:
- true if the automaton can be seen, false otherwise.
canSeeUnit
public boolean canSeeUnit(String role,
Unit unit,
Unit excludeUnit)
- Determines if at least one unit of which the given role is an
observer can see the given unit. If excludeUnit is non-null,
that unit will not be counted.
- Parameters:
role
- The role.unit
- The unit to be spotted.excludeUnit
- Don't count this unit (may be null).- Returns:
- true if the unit can be seen, false otherwise.