src.common.types

Centralized imports and type definitions for the Wordle Solver. This module helps eliminate circular imports and provides a single point for common types.

Classes

GameMode(value)

Available game modes.

GameOutcome(value)

Possible game outcomes.

SolverStrategyProtocol(*args, **kwargs)

Protocol defining the interface for solver strategies.

WordManagerProtocol(*args, **kwargs)

Protocol defining the interface for word management.

class src.common.types.SolverStrategyProtocol(*args, **kwargs)[source]

Protocol defining the interface for solver strategies.

get_top_suggestions(possible_words, common_words, guesses_so_far, count=10, word_manager=None)[source]

Get top N suggestions based on the strategy’s algorithm.

Return type:

List[str]

__init__(*args, **kwargs)
class src.common.types.WordManagerProtocol(*args, **kwargs)[source]

Protocol defining the interface for word management.

get_all_words()[source]

Get all valid words.

Return type:

List[str]

get_common_words()[source]

Get common words subset.

Return type:

List[str]

is_valid_word(word)[source]

Check if word is valid.

Return type:

bool

__init__(*args, **kwargs)
class src.common.types.GameMode(value)[source]

Available game modes.

SOLVER = 'solver'
PLAYER = 'player'
class src.common.types.GameOutcome(value)[source]

Possible game outcomes.

WON = 'won'
LOST = 'lost'
IN_PROGRESS = 'in_progress'