diff options
author | jomo <github@jomo.tv> | 2014-06-29 15:33:27 +0200 |
---|---|---|
committer | jomo <github@jomo.tv> | 2014-06-29 15:33:27 +0200 |
commit | 4a2cbf7f1f6c1e00d6b59eb84e1a14da3e92f59b (patch) | |
tree | 599055dc25fcc930374b7eb0d6fbf703d906f853 /cycle.py | |
parent | 04ab9e93cbdcf51def3a3e255c753a78914944e8 (diff) |
shift items, then check for empty line
Diffstat (limited to 'cycle.py')
-rw-r--r-- | cycle.py | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -56,10 +56,9 @@ def doCycle(player, up): shift = -9 if up else 9 shift = shift % len(items) for _ in range(4): - uniq_items = sorted(set(list(items)[:shift])) # crazy code msg(player, items[:shift]) - items = items[shift:] + items[:shift] # shift "around" + items = items[shift:] + items[:shift] # shift "around" + uniq_items = sorted(set(list(items)[:9])) # get unique inventory if uniq_items != [None]: # row not empty break - inv.setContents(items)
\ No newline at end of file |