aboutsummaryrefslogtreecommitdiff
path: root/motus/lib/validity.mli
blob: dfd876c08491e3c5d753ef5a750eab32efdb1376 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
type t =
  | Wellplaced
  | Misplaced
  | Missing

val sequence : int -> t array Seq.t
(** Build a sequence of all the possible status for a given number of letters *)

val index_of_result : t array -> int
(** Get the index of a validity result *)

val index_to_result : base:int -> int -> t array

val compare_words : string -> ref:string -> t array option

val to_criteria : char -> int -> t -> Criteria.t list -> Criteria.t list

val to_criterias : string -> t array -> Criteria.t list
(** Convert the validity result into a Criteria list, in the context of a given
    word  *)