fixed ctrl-c bug

This commit is contained in:
xereeto 2024-03-09 18:06:53 +00:00
parent 7a0177bbfb
commit c26299fd0e
1 changed files with 3 additions and 1 deletions

View File

@ -215,14 +215,16 @@ def main():
import sys import sys
w=None
try: try:
w=main() w=main()
except KeyboardInterrupt: except KeyboardInterrupt:
pass pass
finally: finally:
print("\033cGoodbye!"+reset,end='') print("\033cGoodbye!"+reset,end='')
cliflag = sys.argv[1] if len(sys.argv) > 1 else '' cliflag = sys.argv[1] if len(sys.argv) > 1 else ''
if(cliflag != "--no-unicode"): if(w and cliflag != "--nounicode"):
print("\n\nWordle "+str(w.turn)+"/6") print("\n\nWordle "+str(w.turn)+"/6")
blocks=["","🟨","🟩"] blocks=["","🟨","🟩"]
for guess in w.guesses: for guess in w.guesses: