| summaryrefslogtreecommitdiff |
diff options
| author | nsensfel <SpamShield0@noot-noot.org> | 2018-09-27 15:40:30 +0200 |
|---|---|---|
| committer | nsensfel <SpamShield0@noot-noot.org> | 2018-09-27 15:40:30 +0200 |
| commit | 2f22e667fbea56884d74ed27777f2e9f3fc9fd53 (patch) | |
| tree | 75300c58cc7b287993887f84b2d68b9d515a9ec0 /src/Struct/BattleSummary.elm | |
| parent | 486ee1dbe21be962e89f421e1dd5f3cbb2fd2177 (diff) | |
Starting to separate background and popup code.
Diffstat (limited to 'src/Struct/BattleSummary.elm')
| -rw-r--r-- | src/Struct/BattleSummary.elm | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/src/Struct/BattleSummary.elm b/src/Struct/BattleSummary.elm deleted file mode 100644 index adab965..0000000 --- a/src/Struct/BattleSummary.elm +++ /dev/null @@ -1,65 +0,0 @@ -module Struct.BattleSummary exposing - ( - Type, - get_id, - get_name, - get_last_edit, - is_players_turn, - decoder, - none - ) - --- Elm ------------------------------------------------------------------------- -import Json.Decode -import Json.Decode.Pipeline - --- Main Menu ------------------------------------------------------------------- - --------------------------------------------------------------------------------- --- TYPES ----------------------------------------------------------------------- --------------------------------------------------------------------------------- -type alias Type = - { - id : String, - name : String, - last_edit : String, - is_players_turn : Bool - } - --------------------------------------------------------------------------------- --- LOCAL ----------------------------------------------------------------------- --------------------------------------------------------------------------------- - --------------------------------------------------------------------------------- --- EXPORTED -------------------------------------------------------------------- --------------------------------------------------------------------------------- -get_id : Type -> String -get_id t = t.id - -get_name : Type -> String -get_name t = t.name - -get_last_edit : Type -> String -get_last_edit t = t.last_edit - -is_players_turn : Type -> Bool -is_players_turn t = t.is_players_turn - -decoder : (Json.Decode.Decoder Type) -decoder = - (Json.Decode.Pipeline.decode - Type - |> (Json.Decode.Pipeline.required "id" Json.Decode.string) - |> (Json.Decode.Pipeline.required "nme" Json.Decode.string) - |> (Json.Decode.Pipeline.required "ldt" Json.Decode.string) - |> (Json.Decode.Pipeline.required "ipt" Json.Decode.bool) - ) - -none : Type -none = - { - id = "", - name = "Unknown", - last_edit = "Never", - is_players_turn = False - } |


