From b042647b68abdc82490ca6e059993b8eba28904c Mon Sep 17 00:00:00 2001 From: Russell Cohen Date: Wed, 24 Nov 2010 01:09:12 -0500 Subject: Refactoring complete! Made modules/packages as appropriate. Finally. --- behaviors/DebugBehavior.py | 8 ++++++++ behaviors/EchoBehavior.py | 12 ++++++++++++ behaviors/__init__.py | 0 3 files changed, 20 insertions(+) create mode 100644 behaviors/DebugBehavior.py create mode 100644 behaviors/EchoBehavior.py create mode 100644 behaviors/__init__.py (limited to 'behaviors') diff --git a/behaviors/DebugBehavior.py b/behaviors/DebugBehavior.py new file mode 100644 index 0000000..4c8550a --- /dev/null +++ b/behaviors/DebugBehavior.py @@ -0,0 +1,8 @@ +from operationscore.Behavior import * +import Util +import pdb +class DebugBehavior(Behavior): + def processResponse(self, sensorInputs, recursiveInputs): + if sensorInputs != []: + print 'Sensor Inputs: ', sensorInputs + return [] diff --git a/behaviors/EchoBehavior.py b/behaviors/EchoBehavior.py new file mode 100644 index 0000000..a11558a --- /dev/null +++ b/behaviors/EchoBehavior.py @@ -0,0 +1,12 @@ +from operationscore.Behavior import * +import Util +import pdb +class EchoBehavior(Behavior): + def processResponse(self, sensorInputs, recursiveInputs): + ret = [] + for sensory in sensorInputs: + outDict = {} + outDict[Util.location] = sensory[Util.location] + outDict['Color'] = (255,0,0) + ret.append(outDict) + return ret diff --git a/behaviors/__init__.py b/behaviors/__init__.py new file mode 100644 index 0000000..e69de29 -- cgit v1.2.3