i know it has been completed over a million times (exagerating), but ive decided to make one on my own. I started out from scratch last night. without looking at any previous productions of a basic version.
its quite simple:
it chooses 7 cards, 5 open and 2 private cards
then it chooses its suit
it will display the cards after betting takes place.
an extremelly siple sequence allows for beautiful graphics (for calcs) that make card-turning professional.
working on identifying pair, 2 pairs, 3 of a kind , full house etc. etc.

its going to be simple... i would NOT be surprised if at least half of you ppl already made a couple versions of this.
why not make all the cards, randomly assort them to a list, and draw off the 'top' of the list, to ensure optimum realistic gameplay. and may I suggest one thing, draw all of the blank cards, store that is a pic, so on the screen that displays cards, just load the pic, and just insert numbers as variables ect, would be faster then hand drawing all of the lines for cards over and over.
im using for( loops for that...but the pick off the top of the list seems like a good idea...i could "burn" cards as well using that method.
i have to add in:
-betting
-flop \
-turn |- all same code basically
-river /
and it is quite nice at the beginnig, 26 letter variables, 52 cards =), just assign a variable a number, run a routine to make sure that number hasnt been picked more then twice (because were in 26 right now) and assign it into the list, then do it again for the 2nd half, and as for burning, you could simply add 50 or so to the number, and when drawing make it skip any numbers higher then 13 (2-ace). and repeat for following games.
This is a useful shuffle routine for card games (should be fairly self explanatory):

Code:
Seq(X4-1,X,0,51->L1 ; -1 = negative one exponent key.
rand(52->L2
SortA(L2,L1

L1 now stores the deck, the int( value is the card number the fPart( value is the type of card (spades etc.).
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement