- data BallState
- data Ball = Ball {}
- mkBall :: Position -> Speed -> Ball
- ballIsFree :: BallState -> Bool
- ballAtCenter :: Field -> Ball
- ballIsGainedBy :: PlayerID -> BallState -> Bool
- data BounceDirection
- bounceBall :: BounceDirection -> (Speed3D, StdGen) -> (Speed3D, StdGen)
- radiusBall :: Float
- surfaceResistance :: Float
- airResistance :: Float
- accellerationSec :: Float
Documentation
ballIsFree :: BallState -> BoolSource
ballIsFree yields True iff argument is (Free ...).
ballAtCenter :: Field -> BallSource
ballAtCenter returns a non-moving ball at the center of the ball field.
ballIsGainedBy :: PlayerID -> BallState -> BoolSource
ballIsGainedBy yields True iff the ball is in possession by the given player.
bounceBall :: BounceDirection -> (Speed3D, StdGen) -> (Speed3D, StdGen)Source
Function used for giving a new random direction towards the given BounceDirection (#param1)
:: Float | officially it should be 0.113m, but that turns out to be too small for rendering |
:: Float | maximum speed of ball when moving over surface |
:: Float | maximum speed of ball when moving through air (should depend on velocity) |
:: Float | acceleration difference per square second |