From ec5c2eae75db8a08c34f81433b902f8812e8f710 Mon Sep 17 00:00:00 2001 From: Gregory Gauthier Date: Wed, 1 Oct 2025 10:24:47 +0100 Subject: [PATCH] minor tweaks --- README.md | 2 +- pyrdle.py | 10 +++++----- wordlists/pyrdle_words_full.txt | 9 +++++++++ 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 1f26ba5..a3745f0 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ A terminal-based implementation of Wordle using Python and ncurses. ## How to Run ```bash -$ poetry run python pyrdle.py --help (20361d14h4m)|*[main] +$ poetry run python pyrdle.py --help usage: pyrdle.py [-h] [--easy | --medium | --hard] [--common | --literary | --techy | --cultural | --full ] [--wordlist FILE] diff --git a/pyrdle.py b/pyrdle.py index ddc7530..f78b2d7 100644 --- a/pyrdle.py +++ b/pyrdle.py @@ -13,7 +13,7 @@ from typing import List, Tuple WORDLIST_DIR = "wordlists" -class pyrdleGame: +class Pyrdle: def __init__(self): self.word_list = [] self.target_word = "" @@ -132,7 +132,7 @@ def draw_title(stdscr, y_offset: int, difficulty: str = ""): stdscr.addstr(y_offset, x, title) stdscr.attroff(curses.A_BOLD) -def draw_board(stdscr, game: pyrdleGame, y_offset: int): +def draw_board(stdscr, game: Pyrdle, y_offset: int): """Draw the game board with all guesses""" height, width = stdscr.getmaxyx() board_x = (width - (game.word_length * 4 - 1)) // 2 @@ -165,7 +165,7 @@ def draw_board(stdscr, game: pyrdleGame, y_offset: int): x = board_x + col * 4 stdscr.addstr(y, x, "[ ]") -def draw_keyboard(stdscr, game: pyrdleGame, y_offset: int): +def draw_keyboard(stdscr, game: Pyrdle, y_offset: int): """Draw visual keyboard showing letter status""" height, width = stdscr.getmaxyx() @@ -318,7 +318,7 @@ def main(stdscr): curses.init_pair(6, curses.COLOR_WHITE, curses.COLOR_BLACK) # Unused letters (gray/dim) # Initialize game - game = pyrdleGame() + game = Pyrdle() if not game.load_words(word_file): # Try fallback to default word list if word_file != "pyrdle_words.txt" and game.load_words("pyrdle_words.txt"): @@ -374,7 +374,7 @@ def main(stdscr): key = stdscr.getch() if key in [ord('n'), ord('N')]: # Start new game - game = pyrdleGame() + game = Pyrdle() game.load_words(word_file) message = "" continue diff --git a/wordlists/pyrdle_words_full.txt b/wordlists/pyrdle_words_full.txt index 6dfdb51..0733187 100644 --- a/wordlists/pyrdle_words_full.txt +++ b/wordlists/pyrdle_words_full.txt @@ -180,6 +180,7 @@ BINGO BIOME BIPED BIRCH +BIRDY BIRTH BISON BITER @@ -1911,6 +1912,7 @@ JOINT JOLLY JUDGE JUICE +KARMA KNIFE KNOCK LABEL @@ -1949,6 +1951,7 @@ LUNCH LUMPY LUNGS LUNKY +LUPIS LUSTY LYING MAGIC @@ -1999,6 +2002,7 @@ MOVED MOVIE MUDDY MUSIC +NADIR NAIVE NAKED NAMED @@ -2040,6 +2044,7 @@ OWNER OXIDE PAGAN PAINT +PANDA PANEL PANIC PAPER @@ -2108,6 +2113,8 @@ PUPIL PUPPY PURSE QUAKE +QUARK +QUART QUEEN QUERY QUEST @@ -2118,6 +2125,8 @@ QUILT QUITE QUOTA QUOTE +RABID +RACER RADAR RADIO RAINY