| summaryrefslogtreecommitdiff | 
diff options
| author | nsensfel <SpamShield0@noot-noot.org> | 2018-02-23 11:35:45 +0100 | 
|---|---|---|
| committer | nsensfel <SpamShield0@noot-noot.org> | 2018-02-23 11:35:45 +0100 | 
| commit | acf9e9f1eb880ffb8ab918c40724eda566aefcc7 (patch) | |
| tree | efa3dd6c88d7970632fbe44f322d03b983b02768 /src/struct/player_turn.erl | |
| parent | 43e38e5fc54fd58e8230b2b5198b6d8cb625803c (diff) | |
Starting a big refactoring...
Diffstat (limited to 'src/struct/player_turn.erl')
| -rw-r--r-- | src/struct/player_turn.erl | 51 | 
1 files changed, 51 insertions, 0 deletions
diff --git a/src/struct/player_turn.erl b/src/struct/player_turn.erl new file mode 100644 index 0000000..b973135 --- /dev/null +++ b/src/struct/player_turn.erl @@ -0,0 +1,51 @@ +-module(player_turn). + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% TYPES %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +-record +( +   player_turn, +   { +      number, +      player_id +   } +). + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% EXPORTS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +-export +( +   [ +      new/2 +   ] +). + +%%%% Accessors +-export +( +   [ +      get_number/1, +      get_player_id/1 +   ] +). + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% LOCAL FUNCTIONS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% EXPORTED FUNCTIONS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%% Accessors +new (Number, PlayerID) -> +   #player_turn +   { +      number = Number, +      player_id = PlayerID +   }. + +get_number (PlayerTurn) -> PlayerTurn#player_turn.number. + +get_player_id (PlayerTurn) -> PlayerTurn#player_turn.player_id.  | 


