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
FISH(6) 							 BSD Games Manual							   FISH(6)

NAME
fish -- play ``Go Fish'' SYNOPSIS
fish [-p] DESCRIPTION
fish is the game ``Go Fish'', a traditional children's card game. The computer deals the player and itself seven cards, and places the rest of the deck face-down (figuratively). The object of the game is to collect ``books'', or all of the members of a single rank. For example, collecting four 2's would give the player a ``book of 2's''. The options are as follows: -p Professional mode. The computer makes a random decision as to who gets to start the game, and then the computer and player take turns asking each other for cards of a specified rank. If the asked player has any cards of the requested rank, they give them up to the asking player. A player must have at least one of the cards of the rank they request in their hand. When a player asks for a rank of which the other player has no cards, the asker is told to ``Go Fish!''. Then, the asker draws a card from the non-dealt cards. If they draw the card they asked for, they con- tinue their turn, asking for more ranks from the other player. Otherwise, the other player gets a turn. When a player completes a book, either by getting cards from the other player or drawing from the deck, they set those cards aside and the rank is no longer in play. The game ends when either player no longer has any cards in their hand. The player with the most books wins. fish provides instructions as to what input it accepts. BUGS
The computer cheats only rarely. BSD
May 31, 1993 BSD
All times are GMT -4. The time now is 11:18 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy