C# Class FootballSimulation.FootballStrategies

Show file Open project: PurdueSIGAI/Soccer

Public Methods

Method Description
ClosestPlayerToPoint ( IEnumerable players, IPointMass target, float max ) : IPointMass

GetOpenPlayers ( PointMass player, ITeam team, ITeam otherTeam, ISimulation simulation, float passingLaneWidth ) : IEnumerable

IsPlayerOpenForPass ( IPointMass player, IPointMass target, IEnumerable otherPlayers, float passingLaneWidth ) : bool

PassToPlayer ( IPointMass player, IPointMass target, IPointMass ball ) : Kick

SpreadOut ( PointMass player, IEnumerable allPlayers, RectangleF pitchBounds, float playerOverlapRadius, float edgeOverlapRadius ) : void

Private Methods

Method Description
PointInTriangle ( Vector2 pt, Vector2 v1, Vector2 v2, Vector2 v3 ) : bool
Sign ( Vector2 p1, Vector2 p2, Vector2 p3 ) : float

Method Details

ClosestPlayerToPoint() public static method

public static ClosestPlayerToPoint ( IEnumerable players, IPointMass target, float max ) : IPointMass
players IEnumerable
target IPointMass
max float
return IPointMass

GetOpenPlayers() public static method

public static GetOpenPlayers ( PointMass player, ITeam team, ITeam otherTeam, ISimulation simulation, float passingLaneWidth ) : IEnumerable
player PointMass
team ITeam
otherTeam ITeam
simulation ISimulation
passingLaneWidth float
return IEnumerable

IsPlayerOpenForPass() public static method

public static IsPlayerOpenForPass ( IPointMass player, IPointMass target, IEnumerable otherPlayers, float passingLaneWidth ) : bool
player IPointMass
target IPointMass
otherPlayers IEnumerable
passingLaneWidth float
return bool

PassToPlayer() public static method

public static PassToPlayer ( IPointMass player, IPointMass target, IPointMass ball ) : Kick
player IPointMass
target IPointMass
ball IPointMass
return Kick

SpreadOut() public static method

public static SpreadOut ( PointMass player, IEnumerable allPlayers, RectangleF pitchBounds, float playerOverlapRadius, float edgeOverlapRadius ) : void
player PointMass
allPlayers IEnumerable
pitchBounds System.Drawing.RectangleF
playerOverlapRadius float
edgeOverlapRadius float
return void