| summaryrefslogtreecommitdiff | 
diff options
Diffstat (limited to 'src/struct/player.erl')
| -rw-r--r-- | src/struct/player.erl | 72 | 
1 files changed, 0 insertions, 72 deletions
| diff --git a/src/struct/player.erl b/src/struct/player.erl deleted file mode 100644 index c4aefd1..0000000 --- a/src/struct/player.erl +++ /dev/null @@ -1,72 +0,0 @@ --module(player). - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% TYPES %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% --type id() :: binary(). - --record -( -   player, -   { -      id :: id(), -      timeline :: list(any()) -   } -). - --opaque struct() :: #player{}. - --export_type([struct/0, id/0]). -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% EXPORTS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% --export -( -   [ -      get_id/1, -      get_timeline/1, -      add_to_timeline/2, -      reset_timeline/1 -   ] -). - --export -( -   [ -      new/1 -   ] -). - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% LOCAL FUNCTIONS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% EXPORTED FUNCTIONS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% --spec get_id (struct()) -> id(). -get_id (Player) -> Player#player.id. - --spec get_timeline (struct()) -> list(any()). -get_timeline (Player) -> Player#player.timeline. - --spec add_to_timeline (list(any()), struct()) -> struct(). -add_to_timeline (NewEvents, Player) -> -   OldTimeline = Player#player.timeline, - -   Player#player -   { -      timeline = (NewEvents ++ OldTimeline) -   }. - --spec reset_timeline (struct()) -> struct(). -reset_timeline (Player) -> Player#player{ timeline = [] }. - --spec new (id()) -> struct(). -new (ID) -> -   #player -   { -      id = ID, -      timeline = [] -   }. - | 


