sort a player's hand in seven cards rummy
sort a player's hand in seven cards rummy
Same way you would sort any 7 items. Are you new to sort?
Mainframe assembler programmer by trade. C coder when I can.
I want tio know how to sort a player's hand in c programming (seven cards rummy) i need a code snippet.
Just go look up sorting algorithms on Wikipedia or just type "sort" into the search forum here. Without knowing how you're storing the hand, all you can get is pesudo-code. And if all you can get is pseudo-code, then you may as well just go look it up yourself on Wikipedia.
Quzah.
Hope is the first step on the road to disappointment.
the first thing you need to do is work out some sort of precedence
when you sort numbers, lower numbers come before bigger numbers
when you sort words, we use the alphabet, ie, 'a' comes before 'b' so 'apple' comes before 'bear'
you will need to work out something like this before you sort your cards, eg, do you want to sort by suit? or do you want to sort by value?