|
Britbot
|
A class which represents an enemy group. More...
Inheritance diagram for Britbot.EnemyGroup:
Collaboration diagram for Britbot.EnemyGroup:Public Member Functions | |
| EnemyGroup () | |
| Creates a new instance of the EnemyGroup class. | |
| Score | GetScore (Group origin) |
| Gets the score for this group. | |
| Location | GetLocation () |
| Returns the average location for this group. | |
| Direction | GetDirection (Group group) |
| This implements the GetDirection of the ITarget interface it returns the best direction to keep the given group (which asked for directions) in a path perpendicular to the direction of the enemy ship thus ensuring that it will reach it as soon as possible. | |
| TargetType | GetTargetType () |
| Gets the type of this target (EnemyGroup) | |
| string | GetDescription () |
| Get description for this target. | |
| bool | Equals (ITarget operandB) |
| Tests if two enemy groups are the same. | |
| void | TargetAssignmentEvent () |
| updates the last turn of assignment | |
| void | TargetDeAssignmentEvent () |
| checks if last assignment wasn't too close if so it adds to the enemy suspition matter | |
| override int | GetHashCode () |
| Gets a unique-ish hash code for the object. | |
| bool | IsInGroup (int enemyPirate) |
| Determines if an enemy pirate belongs to this enemy group. | |
| double | MinimalSquaredDistanceTo (Location location) |
| Gets the minimal distance from this enemy group to a location. | |
| double | MinimalETATo (Location location) |
| Gets the minimal number of turns for the group to reach the given location. | |
| SmartIsland | GuessTarget () |
| Tries to determine the island target of this group from its HeadingVector. | |
| bool | IsApproachingIsland (SmartIsland sIsland) |
| This method checks if this enemy group could be approaching the given island first checks if it moves in the general direction of the island compares difference in trajectory to a MAGIC constant. | |
| double | GetMaxFightPower () |
| returns the average of the maximum fight power in the last outOfDateNumber of turns | |
| void | Update () |
| This method updates the previous location, the last directions and the fighting power of this enemy group. | |
| HeadingVector | GetHeading () |
| This function calculates this enemy group direction based on its last directions simply adds them up. | |
| double | GetHeadingSabilityCoeff () |
| calculates a stability coefficient for this ship 1 means high stability and 0 means low one it becomes lower if there are many direction changes | |
| override string | ToString () |
| override bool | Equals (object obj) |
| Tests if two enemy groups are the same. | |
| bool | IsFormed () |
Static Public Member Functions | |
| static bool | IsInGroup (List< int > group, int enemyPirate) |
| Determines if an enemy pirate belongs to to the group of id's specified. | |
Public Attributes | |
| readonly int | Id |
| unique ID for the enemy group | |
Protected Member Functions | |
| bool | Equals (EnemyGroup other) |
| Tests if two enemy groups are the same. | |
Properties | |
| Location | PrevLoc [get, set] |
| The previous location of this group. | |
| List< int > | EnemyPirates [get, set] |
| List of pirate indexes in this group. | |
Private Member Functions | |
| Location | GetLocation (bool forcePirate) |
| Returns the average location for this group. | |
| int | MaxFightCount () |
| Calculates the maximum amount of pirates supporting each other in the enemy formation. | |
| int | InRangeGroupDistance (EnemyGroup eg, Group group) |
| Determined the minimal time (or distance) between a Group and an EnemyGroup before they will get into each others' attack radius. | |
Private Attributes | |
| int | _lastAssignmentTurn |
| The last turn in which this target was assigned. | |
| Queue< Direction > | _lastDirections |
| A queue of the last directions of this enemy group. | |
| Queue< int > | _lastMaxFightPower |
| A queue of the last max fight power coefficients. | |
Static Private Attributes | |
| static int | _idCount |
| The current id avaliable (every group has its unique one) | |
A class which represents an enemy group.
Definition at line 15 of file EnemyGroup.cs.
1.7.6.1