Coder Social home page Coder Social logo

Comments (5)

shlomif avatar shlomif commented on August 28, 2024

from pysolfc.

hairspring avatar hairspring commented on August 28, 2024

Perhaps make it not impossible (after all, there may be someone weird out there who likes it that way) but at least a warning?

Not a high priority for me either. I think it goes near the end of the wish list.

from pysolfc.

jan-kleks avatar jan-kleks commented on August 28, 2024

@hairspring Thank you for this comment! Some of these mixed-up combinations seem really ridiculous, and more like a bug than anything else. Well, we can analyze these combinations and see if there is actually something interesting. After filing this bug, I found out that someone made a mahjong which you play with French cards (BTW, it might be a nice idea for a new PySol mahjong tile-set if one simplified the cards even more).

However, for a typical user who mostly switches between French-card solitaires and mahjong (I guess these are the most popular solitaire games), it would be really strange to see cards as mahjong tiles in "Playable Preview".

An alternative to the warning would to bury the option "Allow for mixing different cards/tile-sets" deep in advanced settings.

from pysolfc.

joeraz avatar joeraz commented on August 28, 2024

Okay, I thought I had commented on this, but I guess it slipped my mind. I actually dealt with a piece of this one for 2.12.

Regarding the fact that users can mix up cardsets and games, the game would deal, but would not properly recognize the cardset being different. As such, it may treat cards as being different than what the actual suit and rank on the card would indicate.

To give an example, a Tarock deck contains an extra rank between the Jack and Queen for the Cavalier or Knight. If one was to try using a Tarock deck to play classic Klondike, it would not properly recognize the difference in the number of ranks - the ace through queen of the first suit will be recognized correctly, but that king would really be the ace of the second suit, because the game is expecting 13 ranks, not 14. For all but very few games, this would make them virtually unplayable.

There has always been an error message built into the code that would indicate that a cardset is incompatible with the game, though until 2.12, it would only appear under one very specific, and very rare, circumstance. I've updated the logic so that this error would appear when switching cardsets normally. If there is any interest in being able to mix and match cardsets despite the obvious errors, I can make the error more of a warning, and add some verbiage to it indicating that "using an incompatible cardset could make the game unplayable".

As far as the preview goes, I plan to fix that too, but changing the cardset there would require loading the new cardset, which would cause delays. I could also look into just loading one cardset of each type at the start, but this would make the game load slower. I'll need to figure out a good, efficient way to handle this.

from pysolfc.

joeraz avatar joeraz commented on August 28, 2024

After experimenting, I realized that the loading time for the new cardsets is not as problematic as I originally thought. Performance can still be improved, but I've successfully set up playable preview to use the correct cardsets. Closing this as complete.

from pysolfc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.