Archive for August, 2006

BlackJack Ruby Simulator

Monday, August 7th, 2006

It’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!

Financial Woes

Tuesday, August 1st, 2006

Yesterday was supposed to be payday.  It was supposed to be a considerably large payday as well because I got my timecards in a day too late before the previous payday.  Nope, didn’t get paid.

I got an email this morning from the CFO saying it was going to be a week late.  Normally, this would be okay, but I had to use my last $10 on a copayment for my eye appointment this morning.  I have no money to eat.  I owe my father $383.03 for the money he loaned me for taxes.  I have a credit card payment coming up.  I really don’t want to borrow more money from my father, but I really would like to eat lunch for the next week.  I never get stressed out about money, but I don’t have any left.  I don’t want to make a fuss about this, but it was really important that I got this paycheck on time.

IAHGFHDG

I got my Rolleiflex last night too.  It’s kind of in crappy condition and the film advance doesn’t work.  I mailed the guy and I want it taken care of.  He advertised it as in excellent condition, and I don’t think anybody would classify it as excellent.  I also spent $380 on it and for that money I should have gotten one in good condition.  The only thing that functions properly is the shutter, but that’s useless if the film advance doesn’t work.  The lens also has some cleaning marks on it, but it’s acceptably clean I guess.

I have some good news.  I had an eye appointment this morning and it seems as if my eyes have started to stabilize a bit and I am not getting any blinder.  I do have a slight astigmatism in my left eye now, but it’s slight.  I found out that I am a good candidate for Custom LASIK surgery, but sadly I don’t have $5,000 to burn.  It would be quite nice to have near-perfect vision without the hassle of glasses or contacts.  I also have some haloing which kind of bothers me especially when I am trying to focus a camera (apparently, Custom LASIK fixes that as well).  But yeah, new contacts, and I am going to get some new glasses.