diff options
author | Daniel <dmt@daniel-desktop.(none)> | 2011-01-29 18:54:50 -0800 |
---|---|---|
committer | Daniel <dmt@daniel-desktop.(none)> | 2011-01-29 18:54:50 -0800 |
commit | ff07b18748c64243c1c6bc62f489bfd03205d13a (patch) | |
tree | db95373a3511be0dd1e700a78e9f1ea7320769a4 /behaviors/RandomSetBrightColorBehavior.py | |
parent | 83931a3c8e65b4018e98b4986458d1df7172ab91 (diff) | |
parent | 277a5143165d2553ce5e97f151cc6b3cea426468 (diff) |
Merge branch 'master' of github.com:rcoh/SmootLight
Diffstat (limited to 'behaviors/RandomSetBrightColorBehavior.py')
-rw-r--r-- | behaviors/RandomSetBrightColorBehavior.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/behaviors/RandomSetBrightColorBehavior.py b/behaviors/RandomSetBrightColorBehavior.py new file mode 100644 index 0000000..f278858 --- /dev/null +++ b/behaviors/RandomSetBrightColorBehavior.py @@ -0,0 +1,14 @@ +from operationscore.Behavior import * +import util.ColorOps as color +import pdb +import colorsys +import random +class RandomSetBrightColorBehavior(Behavior): + """Sets a random color that is bright.""" + def processResponse(self, sensorInputs, recursiveInputs): + ret = [] + for sensory in sensorInputs: + newDict = dict(sensory) + newDict['Color'] = color.randomBrightColor() + ret.append(newDict) + return (ret, []) |