- data Match = Match {
- team1 :: Team
- team2 :: Team
- theBall :: BallState
- theField :: Field
- theReferee :: Referee
- playingHalf :: Half
- playingTime :: PlayingTime
- score :: Score
- seed :: StdGen
- unittime :: TimeUnit
- type Score = (NrOfGoals, NrOfGoals)
- type NrOfGoals = Int
- lookupPlayer :: PlayerID -> Match -> Maybe Player
- setMatchStart :: Team -> Team -> Field -> Referee -> PlayingTime -> StdGen -> Match
- type Step = (([RefereeAction], [PlayerWithAction]), Match)
- stepMatch :: Match -> Step
- alterStamina :: BallState -> Player -> Angle -> Angle -> Stamina
- alterHealth :: BallState -> Player -> Float -> Angle -> Angle -> Health
- restoreStaminaVelocity :: BallState -> Player -> Angle -> Angle -> Velocity
- maxVelocity :: Player -> Angle -> Angle -> Velocity
- type PenaltyFactor = Float
- kickingPenalty :: Player -> Velocity -> PenaltyFactor
- headingPenalty :: Player -> Velocity -> Velocity -> PenaltyFactor
- maxFatigueLossAtTackle :: Player -> PenaltyFactor
- maxFatigueLossAtFeint :: Player -> PenaltyFactor
- maxVelocityLossAtFeint :: Player -> PenaltyFactor
- oppositeKickPenalty :: Player -> Angle -> PenaltyFactor
Documentation
Match | |
|
setMatchStart :: Team -> Team -> Field -> Referee -> PlayingTime -> StdGen -> MatchSource
type Step = (([RefereeAction], [PlayerWithAction]), Match)Source
alterStamina :: BallState -> Player -> Angle -> Angle -> StaminaSource
Attribute altering functions depending on angles: params: Angle between (zero) and pi, how much the player is running backwards (pi is backwards). Angle between (zero) and pi, the difference between the desired angle and the angle the player previously ran to.
type PenaltyFactor = FloatSource
The functions below defines the penalty factor: values between 0.0 and 1.0 that define the loss of an attribute of an action.
kickingPenalty :: Player -> Velocity -> PenaltyFactorSource
headingPenalty :: Player -> Velocity -> Velocity -> PenaltyFactorSource