Enclosed is the project I am working on. There is a function to figure out if there is a valid run or straight. If so, then all the valid ones are then given as a seperate collection returned by the function. That is what needs to be completed. The parameters being sent to it is howmany (how many in a row like 3 would be 2, 3, 4). Also, there is a variable to determine whether the suit has to match and whether the second number is used. Let me know if you have any questions. if the suits has to match, there is no sorting required because it would already be sorted. if the suits don't have to match, then it will need to find out if there is at least one set that matches the criteria. if there is more than one set, then don't worry about it because it will look for just one set. if there is more than required, then still include it on the collection. If there is no valid straight or run, then nothing would be added to the collection. The collection needs to include all the contents by using set newobj=[url removed, login to view](x) for example. Let me know if you have any questions. This is being used for different rummy games. It can be seperated into an array to figure it out. However, it needs to be put back into the collection again. Also, it needs to consider the wilds when the haswild=true. There is another function as well called isstraight. This function is only used currently when there is a wild because I already have that function when no wilds are considered.
The source code only to accurately figure out based on the collection sent in if there is one valid straight or run. If you need to modify the main procedure to pick random cards for the collection, that's fine. The comments and information given should cover all situations. However, if I change the numbers, it should still work accurately. The function to complete is the straightset function. Also needs to consider wilds when the haswild=true to determine whether there is at least one valid straight. Also, the isstraight function to determine whether a straight exists with the collection sent in (this one will only be ran where the wild cards as being used).
Windows 2000, Windows XP