technomancy / swank-clojure

Swank/slime support for clojure
Eclipse Public License 1.0
412 stars 83 forks source link

Refactor colony-state map #136

Closed nabacg closed 10 years ago

nabacg commented 10 years ago

make colony state structure a bit different so that it's easier to query ant's position. Currently main key is ants guid, which makes it easy to query ants { :ant-id {:position .. :logic .. } }

but is needed is {[x y] {:id ant-id :logic ..}}

so a bit of rewrite in tick,

Also maybe, this is a stupid OOP Idea to put all of state in one place. Seems like what I need is 2 maps positions {[x y] :ant-guid}

and ants colony {:ant-guid logic-function } #...{potentially more as required

nabacg commented 10 years ago

sorry, wrong window ;)