mirror of
https://github.com/correl/riichi.git
synced 2024-11-23 19:19:55 +00:00
show the tiles remaining in the wall
This commit is contained in:
parent
076586eb1b
commit
22f759a76c
2 changed files with 12 additions and 6 deletions
|
@ -59,5 +59,6 @@ player =
|
||||||
|
|
||||||
game : Decoder Game
|
game : Decoder Game
|
||||||
game =
|
game =
|
||||||
map Game
|
map2 Game
|
||||||
(field "players" (list player))
|
(field "players" (list player))
|
||||||
|
(field "wall" int)
|
||||||
|
|
|
@ -5,12 +5,17 @@ import Html exposing (..)
|
||||||
|
|
||||||
|
|
||||||
type alias Game =
|
type alias Game =
|
||||||
{ players : List Player }
|
{ players : List Player
|
||||||
|
, wall : Int
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
view : Game -> Html msg
|
view : Game -> Html msg
|
||||||
view game =
|
view game =
|
||||||
div [] <|
|
div []
|
||||||
List.map
|
[ div [] [ text (toString game.wall) ]
|
||||||
Client.Player.view
|
, div [] <|
|
||||||
game.players
|
List.map
|
||||||
|
Client.Player.view
|
||||||
|
game.players
|
||||||
|
]
|
||||||
|
|
Loading…
Reference in a new issue