Sponsored Content
Top Forums Programming Problem with dealing hands of poker cards Post 302508884 by Corona688 on Tuesday 29th of March 2011 10:58:13 AM
Old 03-29-2011
This code is incomplete. could you post the complete code?

Also, it would be a lot simpler to make the cards integers.

---------- Post updated at 08:58 AM ---------- Previous update was at 08:51 AM ----------

Code:
printf("\t%s of %s, is %s \n ",cards[j%13].face,cards[j%13].suit,cards[j%26].color);

There's no references to i here, so naturally it'd print the same cards every loop -- there's nothing to make it print a different hand.
 

7 More Discussions You Might Find Interesting

1. News, Links, Events and Announcements

Hands on Support

Check this link. Its Sun Solaris Docs link that place all sorts of Materials in it. From Hands on Support materials Etc. Quite intresting. Sun OS Hands on Docs. :cool: (1 Reply)
Discussion started by: killerserv
1 Replies

2. AIX

Hands On Learning - AIX

Hi all, I am interested in your opinions of the best way to get hands-on security experience with AIX. I am proficient with most linux flavors on intel, but need to get familiar with AIX. Any ideas on how to get some hands-on without lumping out $4Gs for a used RS/6000? Thanks EW (4 Replies)
Discussion started by: ewelsh
4 Replies

3. UNIX for Dummies Questions & Answers

I need hands-on skill.

Can someone help me get into a UNIX server so I can get some hands-on skills? (3 Replies)
Discussion started by: FernandesE74
3 Replies

4. AIX

New to AIX and got my hands on a RS6000 v.need help getting it on the network

So im fairly new to AIX and my knowledge is very, very limited but i got my hands on an RS6000 43P model and im trying to get it on the network so i can access it from work. I have pretty much tried everything i can/know how to do by reading up as much as i can but im still lost. I have the 43P... (2 Replies)
Discussion started by: IIIII
2 Replies

5. Linux

problem of wild cards matching..$ls t[A-Z] output

hi all, i have created a file by name tt and while listing the file ,i used the command $ls t from which i was expecting not to list tt file output coz of uppercase range, But it listed that file tt file and am not able understand the reason. kindly help. NOTE OS :Red Hat Enterprise... (0 Replies)
Discussion started by: rajp_8007
0 Replies

6. UNIX for Dummies Questions & Answers

Unix hands on

Hi, I am new to UNIX system, i have theoritical knowledge but never gotta chance to work on UNIX system. I dont have the environment to practice, is there anything which i can download or any online website to work over and get better in UNIX? Please help me.. Thanks & Regard's Span'rd (2 Replies)
Discussion started by: spaniard
2 Replies

7. Red Hat

Is here anyone hands on in Linux Bare Metal Restore..??

Hi all, I am working on Linux Bare Metal Restore in which i have few things to be discussed with a person who has his/her hands on in that process. If anyone kindly give a reply post in this thread.. :) :) Thanks Selva (3 Replies)
Discussion started by: selvarajvs
3 Replies
CANFIELD(6)							   Games Manual 						       CANFIELD(6)

NAME
canfield, cfscores - the solitaire card game canfield SYNOPSIS
/usr/games/canfield /usr/games/cfscores DESCRIPTION
If you have never played solitaire before, it is recommended that you consult a solitaire instruction book. In Canfield, tableau cards may be built on each other downward in alternate colors. An entire pile must be moved as a unit in building. Top cards of the piles are avail- able to be played on foundations, but never into empty spaces. Spaces must be filled from the stock. The top card of the stock also is available to be played on foundations or built on tableau piles. After the stock is exhausted, tableau spaces may be filled from the talon and the player may keep them open until he wishes to use them. Cards are dealt from the hand to the talon by threes and this repeats until there are no more cards in the hand or the player quits. To have cards dealt onto the talon the player types 'ht' for his move. Foundation base cards are also automatically moved to the foundation when they become available. The command 'c' causes canfield to maintain card counting statistics on the bottom of the screen. When properly used this can greatly increase one's chances of winning. The rules for betting are somewhat less strict than those used in the official version of the game. The initial deal costs $13. You may quit at this point or inspect the game. Inspection costs $13 and allows you to make as many moves as possible without moving any cards from your hand to the talon. (The initial deal places three cards on the talon; if all these cards are used, three more are made avail- able.) Finally, if the game seems interesting, you must pay the final installment of $26. At this point you are credited at the rate of $5 for each card on the foundation; as the game progresses you are credited with $5 for each card that is moved to the foundation. Each run through the hand after the first costs $5. The card counting feature costs $1 for each unknown card that is identified. If the infor- mation is toggled on, you are only charged for cards that became visible since it was last turned on. Thus the maximum cost of information is $34. Playing time is charged at a rate of $1 per minute. With no arguments, the program cfscores prints out the current status of your canfield account. If a user name is specified, it prints out the status of their canfield account. If the -a flag is specified, it prints out the canfield accounts for all users that have played the game since the database was set up. FILES
/usr/games/canfield the game itself /usr/games/cfscores the database printer /usr/games/lib/cfscores the database of scores BUGS
It is impossible to cheat. AUTHORS
Originally written: Steve Levine Further random hacking by: Steve Feldman, Kirk McKusick, Mikey Olson, and Eric Allman. 4.2 Berkeley Distribution May 6, 1986 CANFIELD(6)
All times are GMT -4. The time now is 04:26 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy