summaryrefslogtreecommitdiff
blob: d0cb8c8b7d55b76e124e7f61ce41365e5c8fccab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
module View exposing (view)

import Html exposing (Html, button, div, text)
import Html.Events exposing (onClick)

import Update exposing (Msg(..))
import Model exposing (Model)

import Battlemap.Html as Batmap exposing (view)
import Battlemap.Direction exposing (Direction(..))

-- VIEW

view : Model -> (Html Msg)
view model =
   (div
      []
      [
         (button
            [ (onClick (DirectionRequest Left)) ]
            [ (text "Left") ]
         ),
         (button
            [ (onClick (DirectionRequest Down)) ]
            [ (text "Down") ]
         ),
         (button
            [ (onClick (DirectionRequest Up)) ]
            [ (text "Up") ]
         ),
         (button
            [ (onClick (DirectionRequest Right)) ]
            [ (text "Right") ]
         ),
         (button
            [ (onClick EndTurn) ]
            [ (text "Apply") ]
         ),
         (div
            []
            [(Batmap.view model)]
         )
      ]
   )