Early finish when all the cascades are alternating#2
Open
gzsombor wants to merge 2 commits intoIGI-111:masterfrom
Open
Early finish when all the cascades are alternating#2gzsombor wants to merge 2 commits intoIGI-111:masterfrom
gzsombor wants to merge 2 commits intoIGI-111:masterfrom
Conversation
IGI-111
reviewed
Aug 21, 2021
src/game.rs
Outdated
|
|
||
| fn is_victory(&self) -> bool { | ||
| self.foundations.iter().all(|f| f.is_full()) | ||
| self.cascades.iter().all(|c| c.has_all_alternating()) |
Owner
There was a problem hiding this comment.
This clearly breaks the normal way to finish the game if the last card you're stacking is in a cell.
Owner
|
I like the idea, but it's kind of abrupt given the rules to suddenly end like this. Probably better would be to trigger an animation where you stack every possible card automatically when you right click in a trivial scenario. |
Author
|
I've just noticed after thorough testing that this is indeed incorrect, because the game finishes when you pick up the last card, it does not wait until you put into a correct place. |
829d3bd to
b2f8729
Compare
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.
then it can be finished trivially