summaryrefslogtreecommitdiff
blob: 3a0ca054c0861a1e46bbd0dbd6f71b60f06dba7c (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
module Battlemap.Navigator exposing
   (
      Type,
      new_navigator
   )

import Set

import Battlemap
import Battlemap.Direction
import Battlemap.Location
import Battlemap.Tile


type alias Type =
   {
      current_location : Battlemap.Location.Type,
      visited_locations : (Set.Set Battlemap.Location.Ref),
      previous_directions : (List Battlemap.Direction.Type),
      remaining_points : Int
   }

new_navigator : Battlemap.Location.Type -> Int -> Type
new_navigator start points =
   {
      current_location = start,
      visited_locations = Set.empty,
      previous_directions = [],
      remaining_points = points
   }