Pass a reference to the stacks object that holds all the blocks and the index of the initial stack of the block
(self, stacks, position)
| 184 | class VBlock(Block): |
| 185 | |
| 186 | def __init__(self, stacks, position): |
| 187 | """ |
| 188 | Pass a reference to the stacks object that holds all the blocks |
| 189 | and the index of the initial stack of the block |
| 190 | """ |
| 191 | Block.__init__(self, stacks, position) |
| 192 | self.box = box(pos=(position-(stacks.blockCount/2), 0, 0), size=(.9,.9,.9), color=color.blue) |
| 193 | self.label = label(pos=array(self.box.pos) + array([0,0,1]), text=str(position), opacity=0, box=0, line=0) |
| 194 | |
| 195 | def moveTo(self, newPosition): |
| 196 | """Simply puts the block on top of the stack numbered newPosition""" |