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

feat: reset game status #425

Merged
merged 18 commits into from
May 8, 2024
Merged

feat: reset game status #425

merged 18 commits into from
May 8, 2024

Conversation

marwfair
Copy link
Contributor

@marwfair marwfair commented May 2, 2024

Description

This PR adds a game_status document to the boardInfo collection. The game_status value can either be in_progress or reset_in_progress. This value will get set in an upcoming PR by the reset game function.

When I started on this task, we were planning on kicking users out of the game and taking them to the welcome screen while the reset was in progress Now, we want to allow all users to be able to join the game, even while the reset is in progress, and players that are already in the game will remain in the game. Players will just see a "reset in progress" modal and they will be unable to solve any words. If the player is in the middle of solving a word when the reset begins, they will be taken out of the solve flow, but their streak will not be broken. While the reset is in progress, the modal's "Keep playing" button will be disabled. After the reset is complete, the reset modal will remain visible and the "Keep playing" button will be enabled.

To test the functionally in dev, update the game status boardInfo document and set the value to in_progress or reset_in_progress.

Screenshots/Video

Screen.Recording.2024-05-02.at.12.57.37.PM.mov

Type of Change

  • ✨ New feature (non-breaking change which adds functionality)
  • 🛠️ Bug fix (non-breaking change which fixes an issue)
  • ❌ Breaking change (fix or feature that would cause existing functionality to change)
  • 🧹 Code refactor
  • ✅ Build configuration change
  • 📝 Documentation
  • 🗑️ Chore

Monday.com Item IDs

6569236519

@marwfair marwfair marked this pull request as ready for review May 2, 2024 19:17
Copy link
Contributor

@B0berman B0berman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

test/crossword/bloc/crossword_bloc_test.dart Outdated Show resolved Hide resolved
Co-authored-by: Hugo Walbecq <hugo@verygood.ventures>
@marwfair marwfair requested a review from B0berman May 6, 2024 12:55
Copy link
Collaborator

@AyadLaouissi AyadLaouissi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! I left a few comments 👍

lib/crossword/bloc/crossword_bloc.dart Outdated Show resolved Hide resolved
lib/crossword/bloc/crossword_state.dart Show resolved Hide resolved
lib/crossword/view/crossword_page.dart Show resolved Hide resolved
lib/crossword/view/crossword_page.dart Outdated Show resolved Hide resolved
@alestiago
Copy link
Contributor

alestiago commented May 7, 2024

@marwfair I was planning to a final review, but @AyadLaouissi and I left some comments that might change the code a bit. Before continuing I'll let you resolve the comments first and then I'll resume the review (given that the code might change a bit with the suggested comments).

alestiago
alestiago previously approved these changes May 8, 2024
Copy link
Contributor

@alestiago alestiago left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving, in case we want to move this forward and follow-up the pending comments with additional PRs.

@marwfair marwfair requested a review from alestiago May 8, 2024 14:35
@marwfair marwfair merged commit 123b533 into main May 8, 2024
4 checks passed
@marwfair marwfair deleted the feat/reset-game-status branch May 8, 2024 14:47
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.

4 participants