| summaryrefslogtreecommitdiff |
diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/Action/Ports.elm | 4 | ||||
| -rw-r--r-- | src/Struct/Flags.elm | 24 |
2 files changed, 13 insertions, 15 deletions
diff --git a/src/Action/Ports.elm b/src/Action/Ports.elm new file mode 100644 index 0000000..c79d918 --- /dev/null +++ b/src/Action/Ports.elm @@ -0,0 +1,4 @@ +port module Action.Ports exposing (..) + +port store_new_params : (Int, (List String)) -> (Cmd msg) +port reset_params : () -> (Cmd msg) diff --git a/src/Struct/Flags.elm b/src/Struct/Flags.elm index 0e2ca14..ccda57a 100644 --- a/src/Struct/Flags.elm +++ b/src/Struct/Flags.elm @@ -1,7 +1,8 @@ module Struct.Flags exposing ( Type, - maybe_get_param + get_frequency, + get_players ) -- Elm ------------------------------------------------------------------------- @@ -15,7 +16,8 @@ import Util.List -------------------------------------------------------------------------------- type alias Type = { - url_params : (List (List String)) + frequency : Int, + players : (List String) } -------------------------------------------------------------------------------- @@ -25,16 +27,8 @@ type alias Type = -------------------------------------------------------------------------------- -- EXPORTED -------------------------------------------------------------------- -------------------------------------------------------------------------------- -maybe_get_param : String -> Type -> (Maybe String) -maybe_get_param param flags = - case - (Util.List.get_first - (\e -> ((List.head e) == (Just param))) - flags.url_params - ) - of - Nothing -> Nothing - (Just a) -> - case (List.tail a) of - Nothing -> Nothing - (Just b) -> (List.head b) +get_frequency : Type -> Int +get_frequency flags = flags.frequency + +get_players : Type -> (List String) +get_players flags = flags.players |


