Wolf sheep works in tests
[clnl] / src / main / nvm / agent.lisp
index 8e97ea002c5bdf5ff4c06e12c8cd5a2b04ef9283..e20efa20fcbd4f39233e14572cc311244b944de4 100644 (file)
@@ -38,6 +38,12 @@ DESCRIPTION:
 ; Don't want the setter for :who
 (defmethod agent-value-inner ((turtle turtle) (var (eql :who))) (turtle-who turtle))
 
+(defmethod agent-value-inner ((turtle turtle) (var (eql :pcolor)))
+ (patch-color (patch-at (turtle-xcor turtle) (turtle-ycor turtle))))
+
+(defmethod set-agent-value-inner ((turtle turtle) (var (eql :pcolor)) new-val)
+ (setf (patch-color (patch-at (turtle-xcor turtle) (turtle-ycor turtle))) new-val))
+
 (defagent-value patch :pcolor patch-color)
 
 (defagent-value turtle :color)