Much hacking on rule language, getting it to support initial behaviour.

This commit is contained in:
Simon Brooke 2014-07-13 20:25:48 +01:00
parent b640e2590a
commit 5bfddf2e28

View file

@ -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))