From efddc5dab1ab476adad04e573d665a5f8bb05080 Mon Sep 17 00:00:00 2001 From: Dalton Date: Wed, 19 May 2021 13:45:06 -0500 Subject: [PATCH] Update fallout_functions.py These are the changes on remove xrange and replacing with range() --- fallout_functions.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fallout_functions.py b/fallout_functions.py index 2e349fe..0e86be2 100644 --- a/fallout_functions.py +++ b/fallout_functions.py @@ -18,7 +18,7 @@ def slowWrite(window, text, pause = LETTER_PAUSE): """ wrapper for curses.addstr() which writes the text slowely """ - for i in xrange(len(text)): + for i in range(len(text)): window.addstr(text[i]) window.refresh() curses.napms(pause) @@ -65,5 +65,5 @@ def centeredWrite(window, text, pause = LETTER_PAUSE): Writes to the current line but centers the text """ width = window.getmaxyx()[1] - window.move(window.getyx()[0], width / 2 - len(text) / 2) + window.move(window.getyx()[0], int(width / 2 - len(text) / 2)) slowWrite(window, text, pause)