Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/pysamples
diff options
context:
space:
mode:
authorWalter Bender <walter.bender@gmail.com>2011-04-04 21:39:04 (GMT)
committer Walter Bender <walter.bender@gmail.com>2011-04-04 21:39:04 (GMT)
commit1784e6b53e918627515c24717fbf54574e2207c5 (patch)
treed38f154a54afc645d6268746fb99144c2f22e175 /pysamples
parent74f406b505a762c8e55b210539a13ed66b0ae50a (diff)
move the turtle into position to place the next block in the stack
Diffstat (limited to 'pysamples')
-rw-r--r--pysamples/load_block.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/pysamples/load_block.py b/pysamples/load_block.py
index b839757..12c7a71 100644
--- a/pysamples/load_block.py
+++ b/pysamples/load_block.py
@@ -88,8 +88,8 @@ def myblock(tw, blkname):
return make_block(tw, name, x, y, defaults)
return -1
- # Place the block at the active turtle (x, y) and
- # push height to stack.
+ # Place the block at the active turtle (x, y) and move the turtle
+ # into position to place the next block in the stack.
x, y = tw.active_turtle.get_xy()
if type(blkname) == type([]):
name = blkname[0]
@@ -98,5 +98,5 @@ def myblock(tw, blkname):
else:
name = blkname
dy = int(find_block(tw, name, x, y))
- if dy != -1:
- tw.lc.heap.append(dy)
+
+ tw.active_turtle.move((x, y - dy))