feat(scoring): Implement penalty for 'Reveal 1 Pair' hint usage (#39)#66
Open
EDWIN-ADAMS-V wants to merge 3 commits into
Open
feat(scoring): Implement penalty for 'Reveal 1 Pair' hint usage (#39)#66EDWIN-ADAMS-V wants to merge 3 commits into
EDWIN-ADAMS-V wants to merge 3 commits into
Conversation
Author
|
Hello @avinash201199 bro, |
Owner
|
Please resolve the conflicts |
Owner
|
and add the video of the changes |
Author
Changes.in.Demo.1.mp4Here is the visual Demo of the issue i have raised and the solution i have solved it!! |
Owner
|
Please resolve the conflicts |
Author
|
Hi bro !! |
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.
feat(scoring): Implement penalty for 'Reveal 1 Pair' hint usage (#39)
Summary
This Pull Request implements a scoring penalty for using the "Reveal 1 Pair" hint button in
app.js. This is necessary to ensure fair scoring and accurate high score tracking, addressing Issue #39.Why This Change is Needed
The hint provides a significant competitive advantage. Without a penalty, players could easily achieve the highest 3-star rating and top leaderboard spots by relying on the hint rather than pure memory. The penalty ensures that top scores are reserved for unassisted play.
What Has Changed (Penalty Logic)
movescount.hintUsed) is introduced to track if the hint was pressed during the game.hintUsedistrue, the maximum achievable Star Rating is capped at 2 stars, regardless of the total move count. This prevents earning a perfect 3-star score while using assistance.Files Modified
src/js/app.js: Implementation ofhintUsedstate, penalty logic in the hint button's event listener, and updated star calculation/modal content.