mirror of
https://github.com/correl/riichi.git
synced 2024-11-27 11:09:56 +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 []
|
||||||
|
[ div [] [ text (toString game.wall) ]
|
||||||
|
, div [] <|
|
||||||
List.map
|
List.map
|
||||||
Client.Player.view
|
Client.Player.view
|
||||||
game.players
|
game.players
|
||||||
|
]
|
||||||
|
|
Loading…
Reference in a new issue