blob: ed9da4a1da0e5f0fcdd76c9982a9e2b606fbdf6d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
module Update.AddPlayer exposing (apply_to)
-- Elm -------------------------------------------------------------------------
import Array
-- Extension -------------------------------------------------------------------
import Struct.Event
import Struct.Flags
import Struct.Model
import Struct.Player
--------------------------------------------------------------------------------
-- LOCAL -----------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-- EXPORTED --------------------------------------------------------------------
--------------------------------------------------------------------------------
apply_to : Struct.Model.Type -> (Struct.Model.Type, (Cmd Struct.Event.Type))
apply_to model =
(
{model | players = (Array.push (Struct.Player.default) model.players)},
Cmd.none
)
|