From 7a0d0fee72015e09046a6f7e5da1ac796e205963 Mon Sep 17 00:00:00 2001 From: jomo Date: Sun, 29 Jun 2014 15:21:16 +0200 Subject: [PATCH] shift items, then check for empty line --- cycle.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cycle.py b/cycle.py index df1cf42..2dcad51 100644 --- a/cycle.py +++ b/cycle.py @@ -58,7 +58,8 @@ def doCycle(player, up): for _ in range(4): uniq_items = sorted(set(list(items)[:shift])) # crazy code msg(player, items[:shift]) + items = items[shift:] + items[:shift] # shift "around" if uniq_items != [None]: # row not empty break - items = items[shift:] + items[:shift] # shift "around" + inv.setContents(items) \ No newline at end of file