From cfb435e1cb06999e80bb77ff96bbb9957e9ac498 Mon Sep 17 00:00:00 2001 From: skizzerz Date: Fri, 30 Oct 2015 20:18:52 -0500 Subject: [PATCH] Another nightmare fix --- src/gamemodes.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/gamemodes.py b/src/gamemodes.py index 945be58..216d774 100644 --- a/src/gamemodes.py +++ b/src/gamemodes.py @@ -822,7 +822,15 @@ class SleepyMode(GameMode): self.step = 0 self.prev_direction = None for i in range(0, 3): - dir2 = [d for d in directions if d != self.prev_direction] + dir2 = directions[:] + if self.prev_direction == "n": + dir2.remove("s") + elif self.prev_direction == "e": + dir2.remove("w") + elif self.prev_direction == "s": + dir2.remove("n") + elif self.prev_direction == "w": + dir2.remove("e") self.correct[i] = random.choice(directions) self.fake1[i] = random.choice(directions) self.fake2[i] = random.choice(directions)