summaryrefslogtreecommitdiff
blob: 4303b6fee3682efa286aed608d148a84bf17e2de (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
module Model exposing (Type, CharacterSelection, State(..))

import Dict

import Battlemap
import Battlemap.Navigator
import Battlemap.Location
import Battlemap.RangeIndicator

import Error

import Character

type alias CharacterSelection =
   {
      character: Character.Ref,
      navigator: Battlemap.Navigator.Type,
      range_indicator:
         (Dict.Dict
            Battlemap.Location.Ref
            Battlemap.RangeIndicator.Type
         )
   }

type State =
   Default
   | Error Error.Type
   | MovingCharacterWithButtons
   | MovingCharacterWithClick
   | FocusingTile

type alias Type =
   {
      state: State,
      battlemap: Battlemap.Type,
      characters: (Dict.Dict Character.Ref Character.Type),
      selection: (Maybe CharacterSelection)
   }