# Display card output and retreive input
# Armaan Bhojwani 2021
+import curses
import os
class Status():
stdscr.addstr("=")
stdscr.addstr("\n" + str(stack[obj.getIdx()][obj.getSide()]))
+
+ (mlines, mcols) = stdscr.getmaxyx()
+ mlines -= 1
+ mcols -= 5
+
+ try:
+ stdscr.insch(mlines, mcols, str(obj.getIdx() + 1))
+ stdscr.insch(mlines, mcols+1, '-')
+ if obj.getSide() == 0:
+ stdscr.insch(mlines, mcols+2, '1')
+ else:
+ stdscr.insch(mlines, mcols+2, '2')
+ stdscr.insch(mlines, mcols+3, '/')
+ stdscr.insch(mlines, mcols+4, str(len(stack)))
+ except:
+ pass
+
def get_key(stdscr, stack, headers):
idx = Status()
+ curses.curs_set(0)
disp_card(stdscr, stack, headers, idx)
while True: