shlomif / PySolFC

A comprehensive, feature-rich, open source, and portable, collection of Solitaire games.
http://pysolfc.sourceforge.net/
GNU General Public License v3.0
462 stars 105 forks source link

Version 2.15 (Windows) - Select Random Game (Ctrl-R) only ever selects games of the same type currently being played #254

Closed UncreativeHub closed 1 week ago

UncreativeHub commented 2 years ago

If I start a new game of random type (either using 'ctrl-r' or 'File->Select Random Game->All Games'.) Pysol will only pick games of the same type (ie. from the same sub menu in the 'Select' menu)

eg. If I am playing a Hanafuda game, select random game will only ever pick another Hanafuda game.

joeraz commented 2 years ago

Looked at the code, this appears to be intentional. Not sure why it was done this way, as the logic was in place long before I got involved in the project. I speculate that this might be due to the possible need to load new cardsets when changing the game category.

I'd have to do a little more research on the code to see if there's a way I can implement this as an option.

joeraz commented 1 week ago

Upon closer review, I can't think of a good reason for this category restriction logic to be in place. Even the all games demo can randomly choose games that use different cardset types.

I went ahead and removed the logic, but will revisit if I find this leads to further issues later.