From 1df6d1949e02f81017511f70bd25d06b6794b112 Mon Sep 17 00:00:00 2001 From: xereeto Date: Sat, 9 Mar 2024 18:06:55 +0000 Subject: [PATCH] fixed extra output bug on 6 turns, an extra line was being printed --- wordle.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wordle.py b/wordle.py index 72ce39c..5d5bcd0 100644 --- a/wordle.py +++ b/wordle.py @@ -45,7 +45,7 @@ class Wordle: def wonGame(self): return self.curGuess == self.answer def placeCursor(self): - putCursorInside(self.turn,min(len(self.curGuess),4)) + putCursorInside(min(self.turn,5),min(len(self.curGuess),4)) def drawGuessLine(self,i): baseRow = i * 4; baseCol = 46 @@ -207,6 +207,7 @@ def main(): w.updateError("You lost :( The word was "+w.answer+"!") time.sleep(2) midnight = (datetime.datetime.now() + datetime.timedelta(days=1)).replace(hour=0, minute=0, microsecond=0, second=0) + w.updateError() w.updateError("Next WORDLE in: "+str(datetime.timedelta(seconds=(midnight-datetime.datetime.now()).seconds))) time.sleep(2) return w @@ -224,7 +225,7 @@ except KeyboardInterrupt: finally: print("\033cGoodbye!"+reset,end='') cliflag = sys.argv[1] if len(sys.argv) > 1 else '' - if(w and cliflag != "--nounicode"): + if(w and cliflag != "--no-unicode"): print("\n\nWordle "+str(w.turn)+"/6") blocks=["⬛","🟨","🟩"] for guess in w.guesses: