BlackJack Ruby Simulator
Monday, August 7th, 2006It’s been a few days, but I am back.
This weekend I was wicked bored so I decided to embark upon a new project. I started making a BlackJack simulator in Ruby. What it does is you extend the Player class and program it with different strategies for playing and it runs through n iterations and you can calculate the house edge from each strategy.
I have most of the game framework done, and a player class with a very simple strategy done. I still need to implement doubling and splitting though. I also extended the player class to UserPlayer where it asks for user input and is like a (very archaic) blackjack game. I really just plan on using it for testing to make sure everything is working as it should.
Dan W. suggested I extend it for network play eventually (which according to him, wouldn’t be that hard), but I will put that last on my todo list.
Anyways, I have the code so far in a Subversion repository, here.
If you have subversion, just type in
svn co http://ohpie.com/svn/BlackJack/trunk/
If you are interested in contributing, just let me know and I will give you write access to the repository.
More updates to come!
