if self.obj.getIdx() == len(self.stack):
self.obj.setIdx(0)
- progress.dump((self.obj, self.stack, self.headers), self.stack)
+ progress.dump(self.stack, lightcards.get_orig())
sys.exit(0)
def ntotal(self):
elif key == "y":
self.stack = lightcards.get_orig()[1]
self.menu_print("Stack reset!")
+ elif key == "a":
+ self.stack.sort()
+ self.menu_print("Stack alphabetized!")
elif key == "u":
[x.unStar() for x in self.stack]
self.menu_print("All unstarred!")
curses.A_BOLD)
self.win.hline(1, 0, curses.ACS_HLINE, 15)
self.win.addstr(2, 0, "[y]: reset stack to original state\n" +
+ "[a]: alphabetize stack\n" +
"[z]: shuffle stack\n" +
"[f]: flip all cards in stack\n" +
"[t]: reverse stack order\n" +
progress.purge_all()
# Check for caches
- ida = progress.dive(stack)
- if ida:
- (idx, stack, headers) = ida
- else:
- idx = Status()
+ idx = Status()
+ cache = progress.dive(get_orig())
+ if cache:
+ (stack) = cache
# Manipulate deck
if args.shuffle: