[Minihands] Add hint system to Minesweeper game#3
Open
minihands[bot] wants to merge 2 commits intomainfrom
Open
[Minihands] Add hint system to Minesweeper game#3minihands[bot] wants to merge 2 commits intomainfrom
minihands[bot] wants to merge 2 commits intomainfrom
Conversation
added 2 commits
February 12, 2026 12:00
- Add hint tracking with 3 hints per game - Implement intelligent hint logic that prioritizes cells with zero adjacent mines - Add hint button with lightbulb icon and counter in game header - Add visual feedback with amber highlight and glow effect for hint-revealed cells - Update README with hint system documentation - Hints only available during active gameplay
- Add 15 unit tests for hint logic in game_controller_test.dart - Test hint initialization, counter, and availability - Test hint usage and safe cell revelation - Test hint prioritization (zero adjacent mines first) - Test hint state management and reset behavior - Test edge cases (no hints remaining, game not playing, all cells revealed) - Add 6 unit tests for hint visual feedback in cell_widget_test.dart - Test amber color, border, and box shadow for hint-revealed cells - Test AnimatedContainer with 300ms duration - Test hint-revealed cells with content display - Add 10 integration tests for hint button UI in widget_test.dart - Test hint button display and initial state - Test hint button enable/disable based on game state - Test hint count decrease on button tap - Test hint button reset on game reset and difficulty change - Test hint button positioning and icon All 105 tests passing with 99.3% coverage (274/276 lines) for feature files
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.
Summary
Added a comprehensive hint system to the Minesweeper game that provides players with 3 hints per game to reveal safe cells intelligently, enhancing gameplay experience and accessibility.
Implementation Details
Feature Implementation:
GameControllerAnimatedContainerCellmodel to track hint-revealed state separately from user-revealed stateFiles Modified:
lib/controllers/game_controller.dart- Core hint logic and state managementlib/models/cell.dart- AddedisHintRevealedpropertylib/screens/game_screen.dart- Hint button UI integrationlib/widgets/cell_widget.dart- Visual feedback for hint-revealed cellsREADME.md- Documentation of hint system featureQuality Assurance
Comprehensive Test Coverage (99.3% - 274/276 lines):
Unit Tests (31 new tests):
Game Controller Tests (15 tests) -
test/controllers/game_controller_test.dartCell Widget Tests (6 tests) -
test/widgets/cell_widget_test.dartIntegration Tests (10 new tests) -
test/widget_test.dartTest Results:
✅ All 105 tests passing (73 unit tests + 32 integration tests)
Mobile Test Results
Mobile UI tests were executed as part of this PR.


Test Recordings:
Metadata
Generated by Minihands (2 iterations)