From b335b746523ffd59db1402b097a802b3fd99eaac Mon Sep 17 00:00:00 2001 From: rcoh Date: Wed, 8 Dec 2010 16:39:50 -0500 Subject: Code for the demo. Everything works afaik. Contains a couple more optimizations. Contains modify param behavior. Improved support for recursive hooks. Modifications to SmootCoreObject to get us closer to a fully multi-threaded system. This should be the last commit directly to master. All further commits should be on subranches and get merged. --- behaviors/ColorChangerBehavior.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'behaviors/ColorChangerBehavior.py') diff --git a/behaviors/ColorChangerBehavior.py b/behaviors/ColorChangerBehavior.py index 12ef6f4..a3b1739 100644 --- a/behaviors/ColorChangerBehavior.py +++ b/behaviors/ColorChangerBehavior.py @@ -7,8 +7,9 @@ class ColorChangerBehavior(Behavior): for sensory in sensorInputs: newDict = dict(sensory) #don't run into shallow copy issues if self['ColorList'] != None: - newDict['Color'] = Util.chooseRandomColor(self['ColorList']) + newDict['Color'] = Util.chooseRandomColor(self['ColorList']) #TODO: this doesn't work. else: newDict['Color'] = Util.randomColor() +#newDict['Color'] = (255,0,0) ret.append(newDict) - return ret + return (ret, recursiveInputs) -- cgit v1.2.3