SoccerFun-0.1.2: Football simulation framework for teaching functional programming

SoccerFun.Types

Synopsis

Documentation

data Half Source

Constructors

FirstHalf 
SecondHalf 

Instances

class Other a whereSource

type with an inverse value

Methods

other :: a -> aSource

Instances

type TimeUnitSource

Arguments

 = Seconds

time unit in sec.

type SecondsSource

Arguments

 = Float

zero < time unit

data Edge Source

Constructors

North 
South 

Instances

data Reprimand Source

If the referee gives a second yellow he should add red to it himself

Constructors

Warning 
YellowCard 
RedCard 

data Success Source

Constructors

Success 
Fail 

Instances

type FramesToGoSource

Arguments

 = Int

number of frames to go before event ends

data RefereeAction Source

Constructors

ReprimandPlayer PlayerID Reprimand

player with given name receives reprimand

Hands PlayerID

person is seen for doing hands

TackleDetected PlayerID

person is seen for doing tackle

SchwalbeDetected PlayerID

person is seen for doing schwalbe

TheaterDetected PlayerID 
DangerousPlay PlayerID

person is seen for doing dangerous actions

GameOver

end of game

PauseGame

game is paused

AddTime ExtraTime

extra time is added to the game

EndHalf

first half is over, teams go for a second half

Goal ATeam

team playing at home has scored

Offside PlayerID

player is offside at Home

DirectFreeKick ATeam Position

a direct free kick is granted for team home at given position

GoalKick ATeam

a goal kick is granted for team home

Corner ATeam Edge

a corner kick is granted for team home

ThrowIn ATeam Position

a throw in ball is granted for team home at given position

Penalty ATeam

penalty at homeside

CenterKick ATeam

team playing at home may start from the center

Advantage ATeam

referee gives advantages to home-team

OwnBallIllegally PlayerID

ball was for the other team

DisplacePlayers Displacements

displaces all players at the provided position (used with free kicks)

ContinueGame 
TellMessage String

no effect on match, message is displayed by referee

data ATeam Source

Constructors

Team1 
Team2 

Instances

type DisplacementsSource

Arguments

 = [(PlayerID, Displacement)]

players that need to be displaced

type DisplacementSource

Arguments

 = Position

new position