Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Page 1 of 2 12 LastLast
Results 1 to 10 of 14
  1. #1
    Join Date
    Jan 2007
    Posts
    651
    Tokens
    0

    Exclamation PHPoker - Concepts and ideas

    Ok, I'm thinking of making a text based poker game.I was thinking about this and was actually thinking is it possible.The most daunting task i think is randomly out-putting the cards.I don't think I could really do it using rand();

    Another thing is connecting the players together on a 9 seat table.If their is more than 9 players then somehow they will need to be sat at another table and other players seated at that table until its full then moving onto another table.

    Then comes the actual problem of the game being text (and image) based.They all won't refresh with the new content at the same time.This isn't really the biggest of problems, as it could be overcome with a little time and effort.

    So, what do you guys think.Hw would i get round these errors.

    Thanks,
    James
    James


    Connected to reality through a proxy server.

  2. #2
    Join Date
    Jul 2007
    Location
    Scotland
    Posts
    529
    Tokens
    0

    Default

    PM me your MSN. I may have somewhere you can try this.

  3. #3
    Join Date
    May 2007
    Location
    Nebo, NC, USA
    Posts
    2,517
    Tokens
    0

    Latest Awards:

    Default

    ajax? ..

  4. #4
    Join Date
    Jan 2007
    Posts
    651
    Tokens
    0

    Default

    Can you be more specific please ?
    James


    Connected to reality through a proxy server.

  5. #5
    Join Date
    May 2005
    Location
    San Francisco, CA
    Posts
    7,160
    Tokens
    2,331

    Latest Awards:

    Default

    Would be rather easy to update the stuff using AJAX.

    Just run a javascript function every 10 seconds or so and then just use document.getElementById("").innerHTML to update the information.

    The project shouldn't be amazingly hard.

  6. #6
    Join Date
    Jul 2007
    Location
    Scotland
    Posts
    529
    Tokens
    0

    Default

    I think what you forget Simon, possibly because you don't play poker, is that you have to create a database of every single combination of every single poker hand for each suit and for cross suits. It's not going to be hard, just a pain in the ***

  7. #7
    Join Date
    Jun 2005
    Posts
    4,795
    Tokens
    0

    Latest Awards:

    Default

    You need to make the script "intelligent" as you can't code you every possible outcome. Also rand(); is perfectly capable of what you want to do (Number each of the cards in the pack and then use rand to randomly select cards in the pack).

    Quote Originally Posted by RichardKnox View Post
    I think what you forget Simon, possibly because you don't play poker, is that you have to create a database of every single combination of every single poker hand for each suit and for cross suits. It's not going to be hard, just a pain in the ***

  8. #8
    Join Date
    Jan 2007
    Posts
    651
    Tokens
    0

    Default

    Thanks, I'm going to start coding when i break up from school.
    James


    Connected to reality through a proxy server.

  9. #9
    Oni Guest

    Default

    Should be good , although im sure there are many out there, what makes this unique?

  10. #10
    Join Date
    Mar 2005
    Location
    Leeds
    Posts
    3,423
    Tokens
    0

    Latest Awards:

    Default

    Dealing the cards randomly is easy, making sure they are unique is the hard part. I can think of a way of doing it but it would be pretty heavy.

    EDIT: The best way of making sure that you dont deal the same card would be to have each game a "game_id" then logging each card with the a collum with the "game_id". Then before each saving of the card checking if it had been dealt in that game.
    Last edited by Luckyrare; 13-07-2007 at 08:09 PM.

Page 1 of 2 12 LastLast

Posting Permissions

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