changeset 127:cfb0400a94e8

fix move_by
author Radomir Dopieralski <sheep-devel@sheep.art.pl>
date Wed, 09 Jul 2014 18:57:48 +0200
parents afdfb00b79ff
children 3e74269c9190
files kubik.py
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/kubik.py	Wed Jul 09 15:33:42 2014 +0000
+++ b/kubik.py	Wed Jul 09 18:57:48 2014 +0200
@@ -102,11 +102,10 @@
                 position[i] = self.position[i]
         self.position = position
 
-    def move_by(self, delta):
+    def move_by(self, (dx, dy, dz)):
         """Move the foot by the specified amount."""
         x, y, z = self.position
-        dx, dy, dz = delta
-        self.position = x + dx, y + dy, z + dz
+        self.move_to((x + dx, y + dy, z + dz))
 
     def rotate(self, degrees):
         """Rotate the leg around the center of the body horizontally."""