Fixed invalid keyword argument error.
This commit is contained in:
parent
4afd08724f
commit
4eab2f55ed
|
@ -197,8 +197,7 @@ class ActionBlock(Block):
|
|||
def __init__(self, level, x, y, action=None, movable=True):
|
||||
self.__dict__.update(locals())
|
||||
Block.__init__(
|
||||
self, level, x, y, img=level.imgs['block1'],
|
||||
movable=movable)
|
||||
self, level, x, y, 'block1', movable=movable)
|
||||
self._last_pos = None
|
||||
|
||||
def update(self, e, t, dt):
|
||||
|
|
|
@ -216,13 +216,15 @@ class Level1(level.Level):
|
|||
for i in range(3)]
|
||||
self.objects.extend(action_blocks)
|
||||
|
||||
wells = [block.ColorWell(self, task3_pos[0] + 64, task3_pos[1] + 48 * 5)]
|
||||
wells = [block.ColorWell(self, task3_pos[0] + 64,
|
||||
task3_pos[1] + 48 * 5)]
|
||||
self.objects.extend(wells)
|
||||
|
||||
def update_wells(block):
|
||||
cur_boxes = []
|
||||
for block in action_blocks:
|
||||
box = pos_colour.get(((block.x - task3_pos[0]) / 64, (block.y - task3_pos[1] - 48) / 48))
|
||||
box = pos_colour.get(((block.x - task3_pos[0]) / 64,
|
||||
(block.y - task3_pos[1] - 48) / 48))
|
||||
if box:
|
||||
cur_boxes.append(box)
|
||||
|
||||
|
@ -236,7 +238,6 @@ class Level1(level.Level):
|
|||
for b in action_blocks:
|
||||
b.action = update_wells
|
||||
|
||||
|
||||
### Task 4: Inverted bits
|
||||
|
||||
task4_pos = (64 * 13, 48 * 13)
|
||||
|
|
Loading…
Reference in New Issue