...
 
Commits (2)
(ns amoebas.simulation
(:use amoebas.defs amoebas.util)
(:require [amoebas.lib :refer [Neighbors]])
)
......@@ -9,10 +10,6 @@
(defstruct Amoeba :function :species :energy :health :data)
(def Neighbor-Cells
[ [-1 -1] [0 -1] [1 -1] [1 0] [1 1] [0 1] [-1 1] [-1 0] ]
)
;;
;; world stuff
......@@ -199,7 +196,7 @@
[world pop pos a dir data]
(let
[ new-pos (add-pos pos (Neighbor-Cells dir)) ]
[ new-pos (add-pos pos (Neighbors dir)) ]
(if (and (<= MoveEnergy (:energy a)) (free? pop new-pos)) ;; gotta have the energy and the cell must be empty
(do
......
#Leiningen
#Tue Mar 26 20:41:19 CET 2019
groupId=amoebas
artifactId=amoebas
version=0.1.0-SNAPSHOT
revision=f27b332eec9afeffd5bcb83c71b38f2cfbe0adaa\n