diff --git a/priv/src/Client/Decode.elm b/priv/src/Client/Decode.elm index 3016c77..4435687 100644 --- a/priv/src/Client/Decode.elm +++ b/priv/src/Client/Decode.elm @@ -59,5 +59,6 @@ player = game : Decoder Game game = - map Game + map2 Game (field "players" (list player)) + (field "wall" int) diff --git a/priv/src/Client/Game.elm b/priv/src/Client/Game.elm index b1327be..21207b4 100644 --- a/priv/src/Client/Game.elm +++ b/priv/src/Client/Game.elm @@ -5,12 +5,17 @@ import Html exposing (..) type alias Game = - { players : List Player } + { players : List Player + , wall : Int + } view : Game -> Html msg view game = - div [] <| - List.map - Client.Player.view - game.players + div [] + [ div [] [ text (toString game.wall) ] + , div [] <| + List.map + Client.Player.view + game.players + ]