Skip to content

Commit

Permalink
Compose fighter into movementArea; remove Click sub
Browse files Browse the repository at this point in the history
  • Loading branch information
mwunsch committed Sep 27, 2016
1 parent 3f22d18 commit 7a0f270
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions src/Main.elm
Expand Up @@ -82,7 +82,7 @@ update msg game =

subscriptions : GameState -> Sub Msg
subscriptions game =
Mouse.clicks Click
Sub.none



Expand Down Expand Up @@ -116,15 +116,16 @@ view game =
movementArea =
case game.playerSelection of
Nothing ->
[]
[ fighter ]

Just x ->
[ circle
[ fighter
, circle
[ cx (x.position |> posX |> toString)
, cy (x.position |> posY |> toString)
, r (x.profile.move |> toString)
, fill "pink"
, fillOpacity "0.5"
, fill "white"
, fillOpacity "0.25"
]
[]
]
Expand All @@ -134,7 +135,6 @@ view game =
in
svg
[ viewBox "0 0 100 100"
, width "100%"
, onClick
(case game.playerSelection of
Just x ->
Expand All @@ -144,9 +144,4 @@ view game =
NoOp
)
]
(List.append
[ (Tabletop.view tabletop [])
, fighter
]
movementArea
)
(Tabletop.view tabletop [] :: movementArea)

0 comments on commit 7a0f270

Please sign in to comment.