diff options
author | Sébastien Dailly <sebastien@dailly.me> | 2022-02-24 08:59:44 +0100 |
---|---|---|
committer | Sébastien Dailly <sebastien@dailly.me> | 2022-02-24 13:39:39 +0100 |
commit | c2bd6982e5ed845293a38ae600c239cd50924d76 (patch) | |
tree | 4e68d4e7f9c2b9d5ae597f54961891332fc0e985 /motus/lib/validity.mli | |
parent | 89dbb39c3fcd188ef7acf092061d756046b2c5d4 (diff) |
Update code, added tests
Diffstat (limited to 'motus/lib/validity.mli')
-rw-r--r-- | motus/lib/validity.mli | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/motus/lib/validity.mli b/motus/lib/validity.mli new file mode 100644 index 0000000..dfd876c --- /dev/null +++ b/motus/lib/validity.mli @@ -0,0 +1,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 *) |