about summary refs log tree commit diff stats
path: root/057static_dispatch.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-10-31 10:54:48 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-10-31 10:55:01 -0700
commit23692627f932937e37ad49e0354d7691b66577be (patch)
tree368f622a61dcb20e5196c307b3a6fb949673175e /057static_dispatch.cc
parenta4f12265bee3842e1ff71a601a5f4dbcc3b1db7d (diff)
downloadmu-23692627f932937e37ad49e0354d7691b66577be.tar.gz
2331 - generic recipe: first passing test
Diffstat (limited to '057static_dispatch.cc')
-rw-r--r--057static_dispatch.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/057static_dispatch.cc b/057static_dispatch.cc
index fa77cbde..5401c775 100644
--- a/057static_dispatch.cc
+++ b/057static_dispatch.cc
@@ -114,6 +114,7 @@ void replace_best_variant(instruction& inst) {
       best_score = current_score;
     }
   }
+  // End Instruction Dispatch(inst, best_score)
 }
 
 long long int variant_score(const instruction& inst, recipe_ordinal variant) {
@@ -139,6 +140,7 @@ long long int variant_score(const instruction& inst, recipe_ordinal variant) {
       return -1;
     }
   }
+  // the greater the number of unused ingredients, the lower the score
   return 100 - (SIZE(Recipe[variant].products)-SIZE(inst.products))
              - (SIZE(inst.ingredients)-SIZE(Recipe[variant].ingredients));  // ok to go negative
 }