News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

Try patience solitaire

Started by minor28, September 20, 2016, 04:15:22 AM

Previous topic - Next topic

minor28

Nowadays, I have trouble excogitate new projects. I have played solitaire on my iPad
so I figured I would code my own patience. It was more complicated than I initially
thought. But now it works fairly and whoever wants to, can try it.

raymond

I also coded my own some 30 years ago, initially in 16-bit DOS. I rewrote in many years later for 32-bit Windows, and added several features over the years.

I was thus very curious to see your version, but the downloaded zip file does not contain the executable. I tried to run the .bat file but to no avail. What must I do to try your program?
Whenever you assume something, you risk being wrong half the time.
http://www.ray.masmcode.com

anta40

Quote
C:\Users\CSL-NB-064\Desktop\Patience>c:/masm32/bin/ml.exe /c /coff /Cp Patience.asm
Microsoft (R) Macro Assembler Version 14.00.23506.0
Copyright (C) Microsoft Corporation.  All rights reserved.

Assembling: Patience.asm
Patience.asm(1) : fatal error A1000:cannot open file : Patience.inc

Patience.inc is missing...

minor28

#3
Executable and inc files now included. Rbuttonclick moves a card to foundation pile if in sequence.

avcaballero


raymond

Just tried it.

Sorry to say but I think I would go mad playing that game for more than another 10 minutes. Sometimes, the transfers (table-to-table or table-to-foundation) work, other times it simply refuses to work.

Furthermore, your .exe is 1578 kb as compared to a mere 35 kb for mine (no external library) which seems to have many more options and be a lot less frustrating. The user has the option of playing random deals, or preselected deals known to have a solution; over the years, I've built a 219 kb file containing 2000 deals (complete with a solution) divided into four categories of difficulty. When playing random deals, you can replay the same deal over and over again until you give up or solve it. Statistics are kept of the quantity attempted and the number of successes, a rate exceeding 30% probably achievable.
Whenever you assume something, you risk being wrong half the time.
http://www.ray.masmcode.com

minor28

Sorry to hear, raymond. I have not experienced the game fails, as it seems to do for you. The cards.bmp is a 1347 kb resouce which affects the size of the exe. It would be interesting to take a look at your version.

Best regards

raymond

QuoteIt would be interesting to take a look at your version.

The help file in the attached zip is still in the old HLP format. It doesn't seem that MS is interested in supplying a crutch to read such files under Win10 such as supplied with Win8.1 and earlier.

That help file has not been updated to reflect the inclusion of the latest improvements, i.e.
- The original size was based on filling the old 640x480 monitor standard size. The Option menu allows modifying the window size from 50 to 100% of the vertical resolution used for the screen. You can also move the 4/3 ratio window where you prefer and its position (and size) will be remembered in the created .his file (the registry is NOT used)
- Whenever you play random deals, any success solution is retained in a file and can be replayed anytime later to try and find a smaller solution or for whatever other reason.

The rules of my game are a lot more rigid than most games of that nature: three cards at a time from the stack without showing the bottom two, and no UNDO allowed. However, being allowed to replay a random deal as often as you like (i.e. until you give up on that deal), you can try numerous variations of attack and any solution is more gratifying.

The bulk of the zip file is the file of the 2000 deals with their solutions. Have fun.
Whenever you assume something, you risk being wrong half the time.
http://www.ray.masmcode.com

minor28

Hi raymond,
I cannot open your help file. It took a while to know how to move cards. Left click on the card to move and and then right click on destination.

I have no help file but to move cards in my version you press left mouse button and drag the card to it´s destination. If a card is in sequence to a foundation pile you can right click the card and it will move to the foundation pile in question. I have tested and tested and have not had any problems with transfers.

Considering the differences between our versions, you might use wrong method to move the cards. I do not know.

FORTRANS

Hi,

   @minor28, tested on Windows 2000 and XP, just got an empty
green window with both tests.

   @Raymond,  seems to work okay with XP.  Cards seem to be
mishandled on 2000.  Screenshot attached.  Windows 98 gets a
blank window that captures the background.

HTH,

Steve

raymond

I did not rely on what I had on my computer. I therefore downloaded the file posted here, unzipped it and tried it. I'm currently running with Win10 and had no problem whatsoever. I had been running it on Win7, Win8.1 and Win8.2 previously without problem; however, I've never had Win2000 and can't vouch for it. I'm thus at a total loss to explain that screen shot.

I still have a working XP and I will try it later today.
Whenever you assume something, you risk being wrong half the time.
http://www.ray.masmcode.com

raymond

Works fine also on my old computer running XP.

I took the opportunity to recover the original .rtf file used to compile the HLP file and attaching it here. It is NOT updated for the latest improvements.

Eventually, I will try to use it to prepare a CHM file compatible with the latest WinOS.
Whenever you assume something, you risk being wrong half the time.
http://www.ray.masmcode.com

minor28

#12
I have adjusted the pictures thus the exe-file size has been halved. I have also changed the grabbing point on the card to the cursor when moving cards.

I have only tested on win 7-32 byte and win 10-64 byte.

Press left mousebutton down to grab a card and then drag the card to the target pile. Right mousebutton click moves the card directly to the foundation pile.

jj2007

#13
Works fine with Windows 10, but with XP and Win7-64, I just see an empty green screen :(

TWell

Thanks :t
Works with Windows 10 Anniversary version :t