??no need??
Grow Bar, move to color bar Flat and Box
grow_bar, grow_box
I'd like to see a growing box!
Let try with a bar first:
# 3-03 block(x,y,z,material)
def block(x,y,z,material):
game.set_block(Position(x,y,z), materials[material])
# grow_barY
def grow_barY(x,y,z,size):
for j in range(-size,size+1):
block(x,(y+j),z, 'brick')
if size<8:
game.set_timer(2,grow_barY,x,y,z,size+1)
grow_barY(-8, 10,-20,1)
def grow_barZ(x,y,z,size):
for k in range(-size,size+1):
block(x,y,(z+k), 'brick')
if size<8:
game.set_timer(2,grow_barZ,x,y,z,size+1)
grow_barZ(-8, 10,-20,1)
def grow_barX(x,y,z,size):
for i in range(-size,size+1):
block((x+i),y,z, 'brick')
if size<8:
game.set_timer(2,grow_barX,x,y,z,size+1)
grow_barX(-8, 10,-20,1)
def buildAframe(x,y,z,size):
for j in range(size+1):
block(x,(y+j),z, 'brick')
block(x+j,y,z, 'brick')
block(x+8,y+8-j,z, 'brick')
block(x+8-j,y+8,z, 'brick')
if size<8:
game.set_timer(1,buildAframe,x,y,z,size+1)
buildAframe(0, 10,-20,1)
Image and video.