Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementing the Give Up button #124 #125

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

ssaurab
Copy link

@ssaurab ssaurab commented Feb 19, 2022

Implementing the Give Up button. Resolves #124.

Play with the deployed version of this PR here: https://wordlgiveup.herokuapp.com (supports Desktop and Mobile)

Motivation

When you are out of words to guess, rather than filling in the remaining words in vain, give up and move on to next puzzle quicker.

Button Timing Details

Since showing a button that says Give Up from the start of a puzzle is annoying, it only appears 40s after each new puzzle is loaded. Reloading the page resets this timer.

Button Behavior

When clicked, it behaves as if the game is lost. That is, it resets the streak and sets the gameState to 'lost', thereby opening the EndGameModal.

Manual Testing

  • Test to ensure streak is broken
  • Test to ensure 'lost' functionality is intact
  • Test for darkmode
  • Test for responsiveness
  • Test on Firefox
  • Test on Chrome
  • Test on Safari
  • Test on Android (Firefox)
  • Test on iOS (Safari)

Benign bugs to fix in future:

  1. [Fixed in a new commit] If the wordle is completed within 40s, the next puzzle shows Give Up button much sooner (i.e. timer is not reset)
  2. Timer starts running even when user is in InfoModal
  3. [Fixed in a new commit] Closing EndGameModal using x instead of Play Again will have a redundant functionless Give Up button until the next game is started

Feature Video

wordlTesting.mp4

Addresses issue #124
cc: @octokatherine

The button appears 40 s after each new puzzle. Reloading the page resets the timer.
@ssaurab ssaurab marked this pull request as ready for review February 19, 2022 08:41
Show Give Up button only when playing, not after a game is lost (6 attempts or giving up) or won
@ssaurab ssaurab marked this pull request as draft February 19, 2022 19:52
@ssaurab ssaurab marked this pull request as ready for review February 19, 2022 20:20
@ssaurab ssaurab mentioned this pull request Feb 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hint or give up
1 participant