diff options
author | Thomas Voss <mail@thomasvoss.com> | 2024-10-26 01:44:22 +0200 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2024-10-26 01:45:47 +0200 |
commit | 6d9560ad7f3c3f6575ab9bcac885e2e70fcb3bf2 (patch) | |
tree | 205365299e0a71cd08b35c513e2135a4b4f9d04d | |
parent | e1f3df6f817a6de24a90fb53c16b52964e4033e7 (diff) |
Pass param to ‘enumerate’
-rw-r--r-- | yahoozy.py | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -513,8 +513,8 @@ def game_loop(rs: RenderState, body_win) -> None: _, x = body_win.getmaxyx() x_off = x - longest - 4 body_win.addstr(2, x_off, THDR, curses.A_BOLD) - for i, line in enumerate(leaderboard): - body_win.addstr(3 + i, x_off, line) + for i, line in enumerate(leaderboard, 1): + body_win.addstr(2 + i, x_off, line) # Draw the score sheet xtra = 10 if picking_cat else 0 @@ -761,8 +761,8 @@ def game_end(rs: RenderState, body_win) -> None: y, x = body_win.getmaxyx() x_off = x - longest - 4 body_win.addstr(2, x_off, FINAL_TITLE, curses.A_BOLD) - for j, line in enumerate(leaderboard): - body_win.addstr(3 + j, x_off, line) + for j, line in enumerate(leaderboard, 1): + body_win.addstr(2 + j, x_off, line) draw_top10(body_win, hist) |