mchung94 / solitaire-player

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

It shows "?" in everywhere #3

Closed tosunkaya closed 4 years ago

tosunkaya commented 4 years ago
  ??          ??          ??
??  ??      ??  ??      ??  ??

?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ??

my screen: 1920x1080 Windows 10 64 bit

I installed OpenJDK 11 (LTS) jdk-11.0.4+11 and OpenJDK11U-jre_x64_windows_hotspot_11.0.4_11

it isnt working. what's the problem?

tosunkaya commented 4 years ago

If i change screen resoultion 1920x1080 to 1440x900 (i cant see bottom buttons' texts. it works.

can u fix this?

  ??          ??          ??
??  ??      ??  ??      ??  ??

?? ?? ?? ?? ?? ?? ?? ?? ?? Jd Td Qc 2h 4s 8d Th 4h Qd 5c 3s Jh Qs 2d 5d Ts 6h Qh Ac 8c Tc Jc Ks 8s 8h Kh 4c 3h 9h 3c 9s 4d 5h 5s

tosunkaya commented 4 years ago

it works only if it's English. How can i work wtih Turkish

tosunkaya commented 4 years ago

I wrote manually and it shows impossible for this

  Kc          9d          7s
7h  6s      2c  Kd      9c  2s

3d Ah 6d 6c Ad As 7c Js 7d Jd Td Qc 2h 4s 8d Th 4h Qd 5c 3s Jh Qs 2d 5d Ts 6h Qh Ac 8c Tc Jc Ks 8s 8h Kh 4c 3h 9h 3c 9s 4d 5h 5s

mchung94 commented 4 years ago

Thanks for letting me know what's happening. It sounds like the cards you posted, it is impossible to remove the 28 cards from the table. I usually try testing with 1,500 shuffled decks and 43 are also impossible. But I will try to confirm another way if they are truly impossible to solve.

I'll also look into figuring out if I can set it up in Turkish or work around the problem another way.

Also, I posted on another youtube comment the following information, which might not be relevant in Turkish:

mchung94 commented 4 years ago

I also wanted to add here Stefano Bongini's comment from YouTube: Leaving the resolution to bigger values the mouse still clicks on the themes menu button.

I haven't been able to replicate this issue on my computer yet, but it seems like I might need to do some more investigation into how the automation may not find what it's looking for.

mchung94 commented 4 years ago

I was able to change the language to Turkish, and I can see the problem is that I am looking for images of words like "OK", "Undo Board", or "Undo last move".

So far, a possible plan for supporting multiple languages may be:

  1. To click on "Undo Board", look for the icon or image rather than the text below it (it's an image of three cards with an arrow swooping over them).
  2. When the program clicks on "Undo Board" button, a dialog box to confirm (OK/Cancel) may pop up. Right now at this point the program would look for the text "OK", but maybe given that we keep the size consistent and rely on the user having 100% scaling, we can hard code an (X, Y) coordinate to click on the OK button (or "Tamam" in Turkish)
  3. The other place a dialog box may show up is when we run out of moves while trying to discover cards in TriPeaks. In English, the dialog box says "No more moves!" and has buttons labeled "OK" and "Undo last move". In Turkish it says "Başka hareket yok!" and buttons labeled "Tamam" and "Son hareketi geri al". We can also hardcode the (X, Y) coordinate to click on to undo the last move.
  4. One way to differentiate the two dialog boxes is that they have different card images next to the text - the "Undo Board" dialog box has a yellow exclamation point (a "!") and the "No more moves!" dialog box has a blue letter i. There may be other dialog boxes that reuse these icons but these are the only two my program needs to handle.

However, the bigger problem is that there are now two reports of the program not clicking correctly and people changing their resolution to 1440x900 in an attempt to make it work (where it still doesn't work). I have not figured out this part yet.

mchung94 commented 4 years ago

I added a Python script as an alternate implementation of the TriPeaks solver to verify that the game really is impossible - it seems that it is impossible to solve.

I also released version 2.4.0 on the release page which I have tested in Turkish to check that it works now.

I'm still not sure if it solves other problems related to clicking and moving the mouse, but to help, the program now prints a "System Report" showing some things that may help me debug what's going on with the scaling factor.

Maybe I can close this issue out soon and open a new one if people are still having problems with the mouse movement.