-
Notifications
You must be signed in to change notification settings - Fork 42
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
Improve card drawing logic #8
Labels
area: Backend(Game Engine)
Issues related to the UNO game engine in the backend.
bug
Something isn't working
good first issue
Good for newcomers
help wanted
Extra attention is needed
priority: high
Comments
kuv2707
added
bug
Something isn't working
help wanted
Extra attention is needed
good first issue
Good for newcomers
area: Backend(Game Engine)
Issues related to the UNO game engine in the backend.
labels
May 27, 2024
Can I work on this issue? |
can i be assigned this issue? |
id love to work on this issue |
Whoever is solving this, make sure to also handle the case where there is no player with the given id, as after converting to typescript in #33 we get this warning: |
Abhishek-Punhani
pushed a commit
to Abhishek-Punhani/multiplayer-uno
that referenced
this issue
Jun 1, 2024
Fixed the card drawing logic which would also manage moving thrown cards to deck Fixes:shivansh-bhatnagar18#8
Abhishek-Punhani
pushed a commit
to Abhishek-Punhani/multiplayer-uno
that referenced
this issue
Jun 1, 2024
Fixed the card drawing logic which would also manage moving thrown cards to deck Before drawing the card we check that that deck has sufficient card , if not we move thrown cards back to the deck , otherwise we draw a card and push into the cards of the current player Fixes:shivansh-bhatnagar18#8
Abhishek-Punhani
pushed a commit
to Abhishek-Punhani/multiplayer-uno
that referenced
this issue
Jun 1, 2024
Fixed the card drawing logic which would also manage moving thrown cards to deck Before drawing the card we check that that deck has sufficient card , if not we move thrown cards back to the deck , otherwise we draw a card and push into the cards of the current player Fixes:shivansh-bhatnagar18#8
4 tasks
Abhishek-Punhani
pushed a commit
to Abhishek-Punhani/multiplayer-uno
that referenced
this issue
Jun 2, 2024
Fixed the card drawing logic which would also manage moving thrown cards to deck Before drawing the card we check that that deck has sufficient card , if not we move thrown cards back to the deck otherwise we draw a card and push into the cards of the current player Fixes:shivansh-bhatnagar18#8
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area: Backend(Game Engine)
Issues related to the UNO game engine in the backend.
bug
Something isn't working
good first issue
Good for newcomers
help wanted
Extra attention is needed
priority: high
Description
The
drawCardFromDeck
function in engine.js should handle the scenario when the deck is empty. If the deck is empty, the thrown cards (maintained in another array) should be moved back to the deck before drawing a card for the player.Current Code Snippet
Expected Output
Notes
The text was updated successfully, but these errors were encountered: