Example #1
0
 def processResponse(self, sensorInputs, recursiveInputs):
     ret = []
     for sensory in sensorInputs:
         newDict = dict(sensory) 
         if self['ColorList'] != None:
             if isinstance(self['ColorList'], list):
                 newDict['Color'] = color.chooseRandomColor(self['ColorList'])  #Pick randomly
             else:
                 newDict['Color'] = self['ColorList'] #Unless there is only one
         else:
             newDict['Color'] = color.randomColor() 
         ret.append(newDict)
     return (ret, [])
Example #2
0
 def processResponse(self, sensorInputs, recursiveInputs):
     ret = []
     for sensory in sensorInputs:
         newDict = dict(sensory) 
         if self['ColorList'] != None:
             if isinstance(self['ColorList'], list):
                 newDict['Color'] = color.chooseRandomColor(self['ColorList'])  #Pick randomly
             else:
                 newDict['Color'] = self['ColorList'] #Unless there is only one
         else:
             newDict['Color'] = color.randomColor() 
         ret.append(newDict)
     #print ret
     return (ret, [])