mchung94 / solitaire-player

Automatically play Pyramid and TriPeaks Solitaire in Microsoft Solitaire Collection for Windows 10
MIT License
41 stars 14 forks source link

Tri peaks broke after seeing cards #25

Open Eckowasp opened 2 years ago

Eckowasp commented 2 years ago

i was running this for the first time then after seeing the cards in the deck it didn do anything just said the cards no prompt or anything else in command line (i renamed the player to have .bat at the end)

Eckowasp commented 2 years ago

seem to have found the issue for some reason it changes the size of the window making it misread all the cards even after clicking on them making it just stop

marcanacleto commented 1 year ago

I'm having the same problem here, the solver starts and changes the window size and after that it can't read the cards. Do you have any solution for this? From what I understand it has to do with a screen scale resolution conflict, but I don't know very well how to resolve it...

mchung94 commented 1 year ago

Basically, the program will try to resize the window to 1440x900, and move it to the upper left hand corner of the main display, and from that point on, it makes assumptions about where the cards should be.

It'll print out something like this:

Starting a TriPeaks Solitaire Board Challenge...
System Report:
    Window Size (after adjustment) = 1440x900
    Expected Window Size = 1440x900
    DPI = 96
    Expected DPI = 96
    Scaling Factor = 100.0%
    Primary Screen Size (Adjusted for Scaling Factor) = 3840x1600
    Expected Primary Screen Size = 3840x1600
If the scaling factor isn't 100% or the values don't match the expected,
then this program may not work properly.
Looking up which cards are on the board and in the stock pile.
Afterwards, please check and verify the cards it detected.

If the Scaling Factor isn't 100% then the program won't work. In the Windows Display Settings it's the setting over here: image

However, if you have a high resolution display, changing it to 100% may make everything look tiny and unreadable.

There may be other settings that could cause issues but I'm not too sure.

Also, the game should use the classic theme, as if you use a different theme or deck, it might not recognize the cards.

marcanacleto commented 1 year ago

Thanks for the clarifications @mchung94!

I ended up understanding the error that was happening and after resetting the screen resolution to 1440x900 and the scale to 100% the solver worked perfectly!