-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmap.mli
25 lines (18 loc) · 831 Bytes
/
map.mli
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
(** This module represents from the data stored in territory and region files.
It handles loading that data from JSON as well. *)
(** The abstract representation of a map *)
type t
(** A list of territories within the map *)
type territories = Territory.t list
(** A list of regions within the map *)
type regions = Region.t list
(** [json_to_map json] is the map that [json] (equivalent to init in other
modules) *)
val json_to_map : Yojson.Basic.t -> t
(** [get_territories map] are the territories in [map] *)
val get_territories : t -> territories
(** [get_territory map t_name] is the territory named [t] in [map]
Requires: [t_name] is a valid name for a territory in [map] *)
val get_territory : t -> string -> Territory.t
(** [get_regions map] are the [regions] of [map] *)
val get_regions : t -> regions