blob: a6e9401da4e9ed6132c12d34935f3c153e8cd60b (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
from operationscore.Behavior import *
class Square(Behavior):
def processResponse(self, sensorInputs, recursiveInputs):
for sensory in sensorInputs:#TODO: consider replicating the dict
xLoc = sensory['Location'][0]
yLoc = sensory['Location'][1]
width = self['Width']
sensory['Location'] =\
'{x}<'+str(xLoc+width)+',{x}>'+str(xLoc-width)+\
',{y}<'+str(yLoc+width)+',{y}>'+str(yLoc-width)
return (sensorInputs, recursiveInputs)
|