|
Britbot
|
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
Definition at line 574 of file EnemyGroup.cs. {
//count actual moves
int moveCount = 0;
//go over all the direction and compare to Direction.Nothing
foreach (Direction dir in this._lastDirections)
{
if (dir != Direction.NOTHING)
moveCount++;
}
//if move count is 0 then target is stationary and thus very stable
if (moveCount == 0)
return 1;
//otherwise return that
return this.GetHeading().Norm1() / moveCount;
}
|
1.7.6.1