Pass two zero based numbers and get two block objects. All checking done, returns (None, None) if the indexes are wrong
(self, a, b)
| 12 | self.stacks = stacks |
| 13 | |
| 14 | def _getBlocks(self, a, b): |
| 15 | """Pass two zero based numbers and get two |
| 16 | block objects. All checking done, returns (None, None) |
| 17 | if the indexes are wrong |
| 18 | """ |
| 19 | if not (0 < a < self.stacks.blockCount): return None, None |
| 20 | if not (0 < b < self.stacks.blockCount): return None, None |
| 21 | a = self.stacks.blocks[a] |
| 22 | b = self.stacks.blocks[b] |
| 23 | if a.position == b.position: return None, None |
| 24 | return a, b |
| 25 | |
| 26 | def moveOnto(self, a, b): |
| 27 | """ |