From 22f759a76cadb6c6045346eb6183142dbd1f18b0 Mon Sep 17 00:00:00 2001 From: Correl Roush Date: Tue, 21 Nov 2017 20:47:08 -0500 Subject: [PATCH] show the tiles remaining in the wall --- priv/src/Client/Decode.elm | 3 ++- priv/src/Client/Game.elm | 15 ++++++++++----- 2 files changed, 12 insertions(+), 6 deletions(-) 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 + ]