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

the setting of the cardset for Memory-games doesn't get saved #395

Open
hajo4 opened this issue Oct 8, 2024 · 7 comments
Open

the setting of the cardset for Memory-games doesn't get saved #395

hajo4 opened this issue Oct 8, 2024 · 7 comments

Comments

@hajo4
Copy link

hajo4 commented Oct 8, 2024

that means, they get the cardset from the last game played.

Eg: playing memory-16, setting cardset maching,
going to freecell, with cardset default,
going back to memory-16 - it now also has cardset default,

BTW, it would be nice if the games memory-16, -24, -30, -40, -52
each could have their own setting of cardset
(eg default, matching, ishido, matrix, hanafuda, tarok, mahjong ...)

@joeraz
Copy link
Collaborator

joeraz commented Oct 9, 2024

For Matching type games like Memory, I can confirm that the cardset is saved correctly. However, the cardset is not switched unless the current cardset is not compatible with the new game. For Matching type games, all cardsets are compatible, as long as they contain at least as many different cards as are needed for that particular game (i,e, 20 cards for Memory 40). You can see this in action if you switch from one of the smaller Tile Puzzle or Picture Matrix games to Memory 52.

For chosen cardset settings, it's one for the active cardset, plus one for each type/subtype combination. As all of the chosen cardsets are loaded into memory, I don't want to create additional types or subtypes without a very good reason.

@hajo4
Copy link
Author

hajo4 commented Oct 9, 2024

cardset is saved correctly

OK: playing memory-16, setting cardset matching,
going to memory-24, is still has cardset matching,

But then going to freecell, with cardset default,
and coming back to memory-16 - it has cardset default now,
not cardset matching as set before.

Both matching and default should be compatible with memory-games ? Maybe that check has a problem ?

@joeraz
Copy link
Collaborator

joeraz commented Oct 9, 2024

Like I said, it only changes if the current cardset is not compatible with the new game. A French cardset is compatible with Matching games, so no change.

If you go Memory 24 > Tile Puzzle 3x3 or Picture Matrix 3x3 > Memory 24, you'll see this in action, as the cardsets used in those games have less than 12 cards, and thus are not compatible with Memory 24.

It's done this way to keep changes seamless when there isn't a reason to switch cardset (could be confusing otherwise when dealing with joker decks, for example).

@hajo4
Copy link
Author

hajo4 commented Oct 9, 2024

French cardset is compatible with Matching games, so no change.

Well,, this is fairly unexpected behavior for someone who selected cardset matching
for memory-games.
How can he make his selection stick (and still play other games like freecell, or mahjong) ?

@joeraz
Copy link
Collaborator

joeraz commented Oct 10, 2024

While I see where you're coming from, if we change this, it would cause similar unexpected behavior for different types of cardsets (such as French decks with jokers vs. decks without). It could be made a config option, or custom logic could be written so each type of cardset handles incompatible cardsets differently, though either would be a larger undertaking.

@hajo4
Copy link
Author

hajo4 commented Oct 10, 2024

There already is a message 'cardset not compatible',
eg. when going from memory-16 with cardset Dojouii Ukiyo E
to memory-24.

Wouldn't that take care of any such problems ?

Maybe that dialog could suggest some cardset right away,
eg. one of the 'most compatible' cardsets.

@joeraz
Copy link
Collaborator

joeraz commented Oct 10, 2024

That message is basically the last resort when it can't find a compatible cardset for the game you're starting (both the currently selected cardset and the cardset selected for that type/subtype are not compatible), so PySol won't be forced to start the game with an incompatible cardset.

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

No branches or pull requests

2 participants