Author Options:

Solitaire game problem! Answered

How do I manipulate the game of Solitaire so that it deals random 4 of a kind on each deal. Thanks, Hank? EX. 10-jack -7-10-10-4-10 as long as there is 4 of a kind in the deal, in a row or ramdomly.



9 years ago

Your talking about that Game that comes with every windows right? Ok now thats a bit complicated, and you need to acquire some programming skills. The only way i can think of is disassembling it, find out how it works, and then code the 4 of a kind into it. Best way to code it? I don't know, there are alot of ways microsoft could have build that game. I think there's gonna be an array of all cards that gets shuffled. Then just place them from 1 to 52........ Thats the way i would do it. On the other side, the probably have something in there to make shure that you can resolve the game.. Or maybee they didn't? You can't really answer that question without seeing that disassembled code. Also the disassembling by itself could already be illegal depending on local laws and how much of the microsofts eula is absolute in the country you live in. So in the end, you got the keyword to search for, but you probably have to figure it out yourself. But there are alot sources you can learn from, just google it ;)

You're right, a friend of mine did this a couple moth's basck and showed me the code. It's really straightforward actually. There was a VERY LONG array for 1 to 52, and as for the problem, a couple lines down, there are variables that tell the options 1 card, 3 cards etc. Try messing with that!!

Thanks I have searched for a long time and you are the first to give an answer, though my skills are far far below what you suggest, but thanks anyway. Hank