Fixed return value of rolling stones generator.

This commit is contained in:
Niels Serup 2012-08-08 18:51:32 +02:00
parent 7666891baa
commit 7448901b94
1 changed files with 2 additions and 1 deletions

View File

@ -79,7 +79,7 @@ def generate_simple_playfield(width, height, nturns, nstones,
* the playfield is completable in nturns or less * the playfield is completable in nturns or less
* the playfield has at most nstones stones * the playfield has at most nstones stones
Return (playfield : {(x, y): Direction | Blocker | None}, Return (playfield : {(x, y): Direction | Blocker},
steps : int) steps : int)
where (x, y) : (int, int) where (x, y) : (int, int)
@ -145,6 +145,7 @@ def generate_simple_playfield(width, height, nturns, nstones,
used_fields = _fields_from_turns(turns) used_fields = _fields_from_turns(turns)
playfield = {} playfield = {}
del turns[-1]
for p, d in turns: for p, d in turns:
playfield[p] = d playfield[p] = d
emptys = set(itertools.product(range(width), emptys = set(itertools.product(range(width),