From 7448901b94f61cc684a89df1cd3750640a534893 Mon Sep 17 00:00:00 2001 From: Niels Serup Date: Wed, 8 Aug 2012 18:51:32 +0200 Subject: [PATCH] Fixed return value of rolling stones generator. --- robotgame/logic/rollingstone.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/robotgame/logic/rollingstone.py b/robotgame/logic/rollingstone.py index 38b58cc..f2f75bb 100644 --- a/robotgame/logic/rollingstone.py +++ b/robotgame/logic/rollingstone.py @@ -79,7 +79,7 @@ def generate_simple_playfield(width, height, nturns, nstones, * the playfield is completable in nturns or less * the playfield has at most nstones stones - Return (playfield : {(x, y): Direction | Blocker | None}, + Return (playfield : {(x, y): Direction | Blocker}, steps : int) where (x, y) : (int, int) @@ -145,6 +145,7 @@ def generate_simple_playfield(width, height, nturns, nstones, used_fields = _fields_from_turns(turns) playfield = {} + del turns[-1] for p, d in turns: playfield[p] = d emptys = set(itertools.product(range(width),