aboutsummaryrefslogtreecommitdiff
path: root/pixelmappers
diff options
context:
space:
mode:
authorGravatar Russell Cohen <rcoh@mit.edu>2011-01-12 11:58:00 -0500
committerGravatar Russell Cohen <rcoh@mit.edu>2011-01-12 11:58:00 -0500
commit907780f6b298bfa259ace94d07ca137099067e67 (patch)
treea12e1f555c27982b39a49c89383544773ba08039 /pixelmappers
parentc7fc6c2725231eb1427f0edf00d3219409b3d55b (diff)
Added ResponseMover to facilitate spawn and run responses. Modified
simplemapper to fix a bug with null responses.
Diffstat (limited to 'pixelmappers')
-rw-r--r--pixelmappers/SimpleMapper.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/pixelmappers/SimpleMapper.py b/pixelmappers/SimpleMapper.py
index 31a48cc..396eca3 100644
--- a/pixelmappers/SimpleMapper.py
+++ b/pixelmappers/SimpleMapper.py
@@ -13,7 +13,10 @@ class SimpleMapper(PixelMapper):
if pixelDist < bestDist:
bestPixel = pixel
bestDist = pixelDist
- return [(bestPixel,1)]
+ if bestPixel != None:
+ return [(bestPixel,1)]
+ else:
+ return []
else:
#{x}>5,{y}<k
#TODO: we should probably encapsulate this somewhere