This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2011-03-08 14:22:32

tinman313
New Scratcher
Registered: 2011-02-07
Posts: 3

Help with texas hold'em game?

Hey guys,
Im working on creating a texas hold'em game for extra credit in robotics. Anyone have any tips on how I would go about telling the game what cards have been delt to who? and a betting system?

Any help would be greatly apreciated and if you have a project that incorperates these principals id love to take a look at it.

Offline

 

#2 2011-03-08 14:36:10

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: Help with texas hold'em game?

Use variables and lists. BTW, this isn't so advanced, I'll have a mod move it for you.  smile

Offline

 

#3 2011-03-08 14:36:50

BoltBait
Scratcher
Registered: 2009-03-09
Posts: 1000+

Re: Help with texas hold'em game?

You might take a look at my Black Jack program.  Link in sig.


Animated sigs must be banned!
http://boltbait.com/j.pnghttp://boltbait.com/s.pnghttp://boltbait.com/d.pnghttp://boltbait.com/a.pnghttp://boltbait.com/p.png

Offline

 

#4 2011-03-08 14:45:04

tinman313
New Scratcher
Registered: 2011-02-07
Posts: 3

Re: Help with texas hold'em game?

haha, Sorry I thought it was kinda advanced. Im familiar with variables but not lists. Ill have to mess around with them a little so i can get the hang of it, Basically add the cards in each persons hand to a list? correct?

Offline

 

#5 2011-03-08 14:46:42

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: Help with texas hold'em game?

tinman313 wrote:

haha, Sorry I thought it was kinda advanced. Im familiar with variables but not lists. Ill have to mess around with them a little so i can get the hang of it, Basically add the cards in each persons hand to a list? correct?

Yes.

Offline

 

#6 2011-03-08 18:31:42

Ratty1967UK
Scratcher
Registered: 2007-05-16
Posts: 88

Re: Help with texas hold'em game?

Hiya... check out my Video Poker game - there's a deck shuffling algorithm as well as code to score the hands - you just need to change the game-play to Texas Hold'em and add some AI for your other players... that could be the tricky part!

http://scratch.mit.edu/projects/Ratty1967UK/1219190

Offline

 

#7 2011-03-10 14:07:29

tinman313
New Scratcher
Registered: 2011-02-07
Posts: 3

Re: Help with texas hold'em game?

Alright, thanks. Iv made a script that deals the card to the player and AI and keeps track of who has what card but im working on making the progam be able to tell the value of each hand. Like royal flush > Flush > straight... ect. any ideas?

Offline

 

Board footer