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

Cardset format version 7 - cardset subtype and joker deck support #330

Merged
merged 1 commit into from
Aug 12, 2023

Conversation

joeraz
Copy link
Collaborator

@joeraz joeraz commented Jul 27, 2023

This is a pretty big refactor, so I'm doing this as a PR. Also, I have some plans to build off this further, so I consider this to be the point of no return for my 3.0 plans (mentioned in ticket #296).

This PR introduces cardsets version 7, which allows the option to have cardset subtypes. This allows more complex rules regarding which cardsets can be used for each game without requiring creating new main types, for cases where the differences between cardsets are minor. For this initial build, I used this to add support for French joker decks. If a game requires jokers, it must use a deck that contains jokers, but if the game does not require jokers, it doesn't matter whether the deck uses them or not. I do not want cardsets to require jokers, as this would render most of the old cardsets incompatible. This is done by making a French joker deck as a subtype.

I feel this is a little hacky in a couple places - most of this is where I was trying not to break existing options config files or cardsets.

I also changed the way Mahjongg cardsets use version 6, so version 7 cardsets aren't forced to use one set of 3D Mahjongg placement logic.

Attached is a copy of my Neo cardset updated to version 7, with jokers added. Anyone who wants to test can use this to do so. I've also found the matching jokers for many of the existing cardsets and will add them to the cardsets repo when I update those to version 7 later.

I added the game "Thieves" to help test this. Thieves is a variation of Golf from Gnome AisleRiot that implements the jokers, which are wild cards (they can be played on any card, and any card can be played on them). I may rename this game "Joker Golf" later (leaving "Thieves" as an alternate name), depending what other joker deck games we add later.

cardset-neo.zip

@joeraz joeraz mentioned this pull request Jul 27, 2023
@joeraz joeraz force-pushed the feature/cardsets-version-7 branch from bef82cb to cdcfb61 Compare July 27, 2023 22:18
@joeraz
Copy link
Collaborator Author

joeraz commented Aug 3, 2023

I'll give this another week or so, then I'll merge if there aren't any objections by then.

@joeraz
Copy link
Collaborator Author

joeraz commented Aug 12, 2023

Since I haven't heard any objections, merging.

@joeraz joeraz merged commit 13a29b3 into shlomif:master Aug 12, 2023
1 check passed
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.

1 participant