Thread: how to sort a player's hand in seven card rummy

  1. #1
    Registered User
    Join Date
    May 2010
    Posts
    2

    Question how to sort a player's hand in seven card rummy

    sort a player's hand in seven cards rummy

  2. #2
    Jack of many languages Dino's Avatar
    Join Date
    Nov 2007
    Location
    Chappell Hill, Texas
    Posts
    2,332
    Same way you would sort any 7 items. Are you new to sort?
    Mainframe assembler programmer by trade. C coder when I can.

  3. #3
    Registered User
    Join Date
    May 2010
    Posts
    2

    Exclamation Sorting a player's hand

    I want tio know how to sort a player's hand in c programming (seven cards rummy) i need a code snippet.

  4. #4
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    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.

  5. #5
    Registered User
    Join Date
    Jun 2010
    Posts
    45
    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?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Cribbage Game
    By PJYelton in forum Game Programming
    Replies: 14
    Last Post: 04-07-2003, 10:00 AM
  2. OpenGL .dll vs video card dll
    By Silvercord in forum Game Programming
    Replies: 14
    Last Post: 02-12-2003, 07:57 PM
  3. Sign up: The Card Game Contest
    By ygfperson in forum Contests Board
    Replies: 40
    Last Post: 09-24-2002, 05:43 PM
  4. card shuffling dealing question
    By Unregistered in forum C++ Programming
    Replies: 2
    Last Post: 04-03-2002, 08:37 PM
  5. need help with error messages
    By Shy_girl_311 in forum C++ Programming
    Replies: 0
    Last Post: 12-01-2001, 02:33 PM