aboutsummaryrefslogtreecommitdiff
path: root/calculette_aoo/lib/build.mli
diff options
context:
space:
mode:
Diffstat (limited to 'calculette_aoo/lib/build.mli')
-rw-r--r--calculette_aoo/lib/build.mli35
1 files changed, 35 insertions, 0 deletions
diff --git a/calculette_aoo/lib/build.mli b/calculette_aoo/lib/build.mli
new file mode 100644
index 0000000..3e2e690
--- /dev/null
+++ b/calculette_aoo/lib/build.mli
@@ -0,0 +1,35 @@
+type build = {
+ a : Carac.t
+ ; m : Carac.t
+ ; rm : Carac.t
+ ; pm : Carac.t
+ ; fm : Carac.t
+}
+
+type env = {
+ cout_sort : int
+ ; degat_sort : int
+ ; max_tours : float
+ ; fm_oponent : int
+ ; cost_max : int
+ ; frequencies : (int * float) list
+}
+
+val buil_freq_table : int -> int -> (int * float) list
+(** Build a list with the differents percentages to hit *)
+
+val cost : build -> int
+(** Get the cost for a build *)
+
+val score : env -> build -> float
+(** Get the score for the build *)
+
+val traverse : env -> int * float -> build list -> build
+(** Test differents upgrade configuration and present the best one with the
+ constraints given in [env].
+
+ The costt for the upgrade will not exceed the property [env.cost_max]
+ *)
+
+val upgrade : env -> build -> build list
+val repr : env -> Format.formatter -> build -> unit