PDA

View Full Version : PHPoker - Concepts and ideas



Mr Macro
12-07-2007, 07:18 PM
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

RichardKnox
12-07-2007, 07:56 PM
PM me your MSN. I may have somewhere you can try this.

Dentafrice,
12-07-2007, 08:05 PM
ajax? ..

Mr Macro
12-07-2007, 08:33 PM
Can you be more specific please ?

Invent
13-07-2007, 07:11 PM
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.

RichardKnox
13-07-2007, 07:15 PM
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 ***

Tomm
13-07-2007, 07:30 PM
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).


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 ***

Mr Macro
13-07-2007, 07:44 PM
Thanks, I'm going to start coding when i break up from school.

Oni
13-07-2007, 07:50 PM
Should be good :), although im sure there are many out there, what makes this unique?

Luckyrare
13-07-2007, 08:06 PM
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.

Mentor
13-07-2007, 08:13 PM
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.

its not actualy that hard, u could even probably copy alot of the functionally loosely from this java class http://www.faqs.org/docs/javap/source/Deck.java

Mr Macro
13-07-2007, 08:20 PM
Can't use JavaScript personally.

Mentor
13-07-2007, 08:24 PM
Can't use JavaScript personally.

whats javascript got to do with anything? I ment you look at the java class and see what its doing so u can constrcut a php equivlent o.0

Mr Macro
13-07-2007, 09:02 PM
Oh right sorry, lol :)

Want to hide these adverts? Register an account for free!