Texas Hold’em

This is a program I wrote with a partner as part of my Senior Capstone at Pacific Lutheran University.  It roughly emulates the game Texas Hold’em with 1-3 computer players.

Background:

We wanted to choose a challenging project that would sufficiently test our programming skills.  My partner was a Math/Computer Science double major and needed something to satisfy both majors, so we decided he would handle the artificial intelligence of the computer players and the randomization of the shuffle / dealing of cards.  That left me to program the structure of the game and the graphical interface.

We originally wanted it to be a networked game with individual table and a lobby so you could play with friends on campus and socialize.  However we quickly found out after our first code review that we bit off more than we could chew, especially when we found out that the school network blocked most ports; I couldn’t even get an “echo” demo running (type something on one computer and have it appear on another).

We were also told by our advisor at the time not to be writing any code the first semester, that it should be all design.  We later discovered from our instructor that he meant to say “don’t use any of the code you write in the first semester in the final project since that  code is likely hastily written as proof-of-concepts.”

As a result, we only had 1 semester to code, test, and demo our program for the final presentation. Therefor, the overall interface for the program, while functional, is a little…disjoint, not smooth flowing.  Likewise, there wasn’t as much randomness / bluffing / risk-taking in the artificial intelligence as we hoped for, but functionally, we met our requirements of a 2-4 player game with artificial intelligence that’s capable of playing the game autonomously.

TexasHoldem – Download program source.  Main class is TexasHoldem

Bookmark the permalink.

One Comment

  1. Pingback: Project Euler: Problem 54 – Poker hands | Pursuit of Intellectual Curiosity

Leave a Reply

Your email address will not be published. Required fields are marked *