A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: [F8] FlashPoker

  1. #1
    Junior Member
    Join Date
    Oct 2006
    Posts
    2

    [F8] FlashPoker

    I'm attempting to code a poker game, but I'm not sure where to start. I know I should have a var for the rank and suit of each card, which will be stored in a variable for that card, which in turn is stored in a variable for the hand of that player.

    However, I don't know how to go about checking for a pair, or a straight. I would want the code to check for multiple matching vars, and also vars in sequential order. I'm not sure how to do that...

    Thanks for any help on this in advance.

  2. #2
    Senior Member calmchess's Avatar
    Join Date
    Sep 2006
    Location
    Earth
    Posts
    2,588
    hey remember when you build it that somebody has to deal ...and if that person leaves then the games ends....however you can program flash media server2 to have a server side script which deals even if a player leaves the virtual table.

  3. #3
    Junior Member
    Join Date
    Oct 2006
    Posts
    2
    Well, for now I'm just going for a single player poker game to perfect that coding, likely video poker or something. (maybe strip poker to send to friends maybe)

  4. #4
    Yarrrrrr
    Join Date
    Jul 2006
    Location
    Calgary, Canada
    Posts
    89
    i made you this but it dosen't load the images on each card properly , though it still might help, each card has a suit and number value, and i have it displaying 5 of the cards at random right now.
    Attached Files Attached Files

  5. #5
    Banned NTD's Avatar
    Join Date
    Feb 2004
    Posts
    3,438
    Hi,

    Poker is a pretty in depth project if your a beginning actionscripter. Dealing the cards is actually pretty easy. You can use a single card back to deal to mulitple players. The only cards that need to be viewed are the current players cards until after the hand is played. The attachMovie method works well for dealing cards.

    A project like this will be very heavy in the use of arrays, for loops, and if statements. You will need to create a scoring system to rank individual hands as well as individual cards. Here is the evaluate function I use in the poker engine demo in my sig....


    The above evaluate function was very difficult to figure out and still has a bug. If two hands tie, the last one dealt wins. I havn't had time to mess with it in quite awhile. If your new to Flash and Actionscript, I suggest exploring some easier projects before tackleing this monster
    Last edited by NTD; 10-19-2006 at 05:45 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center