From 7f88db7003a03b50dc500bf7bd711407f1a640de Mon Sep 17 00:00:00 2001 From: rcoh Date: Sat, 22 Jan 2011 13:31:56 -0500 Subject: Bouncing behavior. Working out a weird bug. Threading may be involved? --- behaviors/RestrictLocation.py | 2 +- behaviors/Square.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'behaviors') diff --git a/behaviors/RestrictLocation.py b/behaviors/RestrictLocation.py index febc9ed..f6c26ff 100644 --- a/behaviors/RestrictLocation.py +++ b/behaviors/RestrictLocation.py @@ -25,7 +25,7 @@ class RestrictLocation(Behavior): def processResponse(self, sensorInputs, recursiveInputs): ret = [] for data in sensorInputs: - if not self.locEval(data['Location']): + if self.locEval(data['Location']): (dataOut, recur) = self.paramModifier.immediateProcessInput([data], []) #behaviors expect lists ^[] ret += dataOut diff --git a/behaviors/Square.py b/behaviors/Square.py index a6e9401..aef3622 100644 --- a/behaviors/Square.py +++ b/behaviors/Square.py @@ -5,6 +5,7 @@ class Square(Behavior): xLoc = sensory['Location'][0] yLoc = sensory['Location'][1] width = self['Width'] + #sensory['Location'] = 'True' sensory['Location'] =\ '{x}<'+str(xLoc+width)+',{x}>'+str(xLoc-width)+\ ',{y}<'+str(yLoc+width)+',{y}>'+str(yLoc-width) -- cgit v1.2.3