From 5bfddf2e285e80ecb790a1bdee6380be77583e45 Mon Sep 17 00:00:00 2001
From: Simon Brooke <simon@journeyman.cc>
Date: Sun, 13 Jul 2014 20:25:48 +0100
Subject: [PATCH] Much hacking on rule language, getting it to support initial
 behaviour.

---
 src/mw_engine/utils.clj | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/mw_engine/utils.clj b/src/mw_engine/utils.clj
index af78f8e..ebe8e20 100644
--- a/src/mw_engine/utils.clj
+++ b/src/mw_engine/utils.clj
@@ -90,8 +90,10 @@
       should be searched;
     * `property` a keyword representing a property of the neighbours.
     * `value` a value of that property"
+  ([world x y depth property value comparator]
+    (filter #(apply comparator (list (get % property) value)) (get-neighbours world x y depth)))
   ([world x y depth property value]
-    (filter #(= (get % property) value) (get-neighbours world x y depth)))
+    (get-neighbours-with-property-value world x y depth property value =))
   ([world cell depth property value]
     (get-neighbours-with-property-value world (:x cell) (:y cell) depth 
                                         property value))