aboutsummaryrefslogtreecommitdiff
path: root/motus/lib/wordlist.mli
blob: a56cab3466f1145b05e196373d3bfb4d92f33a7d (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
(** The dictionnary *)

type t

val empty_data : unit -> t
(** Create an empty dictionnary. The resulting dictionnay cannot be used, it is
    juste here if required for initialisation *)

val words : t -> string Seq.t
(** Load all the words *)

val list_size : t -> int
(** Number of words in the list *)

val add_words : Criteria.t list -> string Seq.t -> t
(** Create a word list from an initial sequence. 

    Checks are made against the differents criteria in order to ensure that the
    word is valid *)

val filter : Criteria.t list -> t -> t
(** Remove all the words that does not match the criterias. *)

val remove_word : t -> string -> t
(** Remove a word from this list. This function is called when a proposition
    from the application is not recognized by the game. *)