Add TUI functionality with --tui parameter for interactive Wordle gameplay#1
Draft
Add TUI functionality with --tui parameter for interactive Wordle gameplay#1
Conversation
Co-authored-by: front-rear <146909790+front-rear@users.noreply.github.com>
Co-authored-by: front-rear <146909790+front-rear@users.noreply.github.com>
Co-authored-by: front-rear <146909790+front-rear@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add TUI (Text User Interface) functionality
Add TUI functionality with --tui parameter for interactive Wordle gameplay
Aug 28, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR implements a comprehensive TUI (Terminal User Interface) mode for the Wordle game, adding modern interactive gameplay while preserving all existing functionality.
Overview
The new
--tuiparameter enables a full-screen terminal interface built withratatuiandcrossterm, providing an enhanced user experience compared to the traditional CLI mode.Key Features
TUI Interface Components
Interactive Controls
Color Feedback System
Technical Implementation
New Dependencies
Added
ratatui(v0.28) andcrossterm(v0.28) for terminal UI and cross-platform terminal control.Code Structure
src/tui.rs: Complete TUI implementation with app state management and renderingsrc/args.rs: Added--tuicommand line parameter with conflict validationsrc/main.rs: Integrated TUI mode with minimal changes to existing logicCargo.toml: Added required dependenciesParameter Validation
The
--tuiparameter conflicts with--randommode as specified in requirements, with clear error messaging.Compatibility
All existing features work seamlessly with TUI mode:
--difficult): Enforces all constraints in TUI--stats): Records and displays game results--config): All configuration options supported--final-set,--acceptable-set): Works with TUIUsage Examples
Design Principles
tui.rsmoduleThe TUI mode provides a modern, interactive experience while maintaining 100% backward compatibility with the existing CLI interface.
This pull request was created as a result of the following prompt from Copilot chat.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.