Pile a over b Where a and b are block numbers, puts the pile of blocks consisting of block a, and any blocks that are stacked above block a, onto the top of the stack containing block b. The blocks stacked above block a retain their original order when move
(self, a, b)
| 87 | ## block.moveTo(b.position) |
| 88 | |
| 89 | def pileOver(self, a, b): |
| 90 | """ |
| 91 | Pile a over b |
| 92 | |
| 93 | Where a and b are block numbers, puts the pile of blocks consisting of |
| 94 | block a, and any blocks that are stacked above block a, onto the top of |
| 95 | the stack containing block b. The blocks stacked above block a retain |
| 96 | their original order when moved. |
| 97 | """ |
| 98 | a, b = self._getBlocks(a, b) |
| 99 | if not a: return # Ignore bad indexes |
| 100 | # Remove all the blocks on top of a and including onto b's stack |
| 101 | blocksToMove = [a] + a.above |
| 102 | for bl in blocksToMove: |
| 103 | bl.moveTo(b.position) |
| 104 | |
| 105 | def quit(self): |
| 106 | """ |
no test coverage detected