Represents the stacks where all the blocks are
| 116 | |
| 117 | |
| 118 | class Stacks(object): |
| 119 | """Represents the stacks where all the blocks are""" |
| 120 | |
| 121 | def __init__(self, num): |
| 122 | """Pass the number of stacks""" |
| 123 | self.blockCount = num |
| 124 | # Create our list of blocks. This will never change |
| 125 | self.blocks = [VBlock(self, i) for i in range(num)] |
| 126 | # Create a list of stacks. Each stack is represented by a list |
| 127 | self._stacks = [] |
| 128 | for i in range(num): |
| 129 | self._stacks.append([self.blocks[i]]) |
| 130 | |
| 131 | def __getitem__(self, i): |
| 132 | """Just enables people to access our stacks in an easy readonly way""" |
| 133 | return self._stacks.__getitem__(i) |
| 134 | |
| 135 | |
| 136 | class Block(object): |