Changed number of steps required in task 2.
This commit is contained in:
parent
dbd025d3d0
commit
bee5e9f683
|
@ -135,32 +135,44 @@ class Level1(level.Level):
|
|||
|
||||
playfield, nsteps, directions = (
|
||||
logic.rollingstone.generate_simple_unsolved_solvable_extra(
|
||||
task2_size[0], task2_size[1], 7, 30))
|
||||
task2_size[0], task2_size[1], 5, 50))
|
||||
|
||||
for i, j in playfield:
|
||||
self.objects.append(
|
||||
block.Block(self,
|
||||
task2_pos[0] + 64 * i,
|
||||
task2_pos[1] + 48 * j,
|
||||
self.imgs['block1'],
|
||||
movable=True)
|
||||
if (random.randint(0, 2) or (i, j) == (4, 0)) else
|
||||
block.Block(self,
|
||||
task2_pos[0] + 64 * i,
|
||||
task2_pos[1] + 48 * j,
|
||||
self.imgs['block3'],
|
||||
movable=False))
|
||||
|
||||
arrow_blocks = []
|
||||
n = 0
|
||||
for i in directions:
|
||||
arrow_blocks.append(
|
||||
block.ArrowBlock(self,
|
||||
task2_pos[0] + 64 * (task2_size[0] - n),
|
||||
task2_pos[1] + 48 * (task2_size[1] + 2),
|
||||
i.next_pos((0, 0))))
|
||||
c = len(playfield) / len(directions)
|
||||
ns = [k * c for k in range(len(directions))]
|
||||
arrow_blocks = []
|
||||
for i, j in playfield:
|
||||
if n in ns:
|
||||
arrow_blocks.append(
|
||||
block.ArrowBlock(self,
|
||||
task2_pos[0] + 64 * i,
|
||||
task2_pos[1] + 48 * j,
|
||||
directions[n / c].next_pos((0, 0))))
|
||||
else:
|
||||
self.objects.append(
|
||||
block.Block(self,
|
||||
task2_pos[0] + 64 * i,
|
||||
task2_pos[1] + 48 * j,
|
||||
self.imgs['block1'],
|
||||
movable=True)
|
||||
if (random.randint(0, 2) or (i, j) == (4, 0)) else
|
||||
block.Block(self,
|
||||
task2_pos[0] + 64 * i,
|
||||
task2_pos[1] + 48 * j,
|
||||
self.imgs['block3'],
|
||||
movable=False))
|
||||
n += 1
|
||||
|
||||
# arrow_blocks = []
|
||||
# n = 0
|
||||
# for i in directions:
|
||||
# arrow_blocks.append(
|
||||
# block.ArrowBlock(self,
|
||||
# task2_pos[0] + 64 * (task2_size[0] - n),
|
||||
# task2_pos[1] + 48 * (task2_size[1] + 2),
|
||||
# i.next_pos((0, 0))))
|
||||
# n += 1
|
||||
|
||||
self.objects.extend(arrow_blocks)
|
||||
self.objects.append(lever.Lever(self,
|
||||
task2_pos[0] + 64 * 3,
|
||||
|
|
Loading…
Reference in New Issue