Tuesday, December 18, 2007
I created an iPhone app!!
It was fun!!! In my last contract I ended up doing some Javascript fun stuff and I figured why not give web programing a whirl and see what happens. What better way to do some web programming than to program for an iPhone??? Its wizzy, its cool and I can carry it my back pocket!
So here's what it is, its a dice roller for the popular game "Settlers of Catan". Specifically for the "Cities and Knights" variant of Settlers. It rolls 2 dice and also a colored ship die. The user can simulate a Settlers roll multiple, multiple times and then see how the distribution aligns with known probability theory of 2 dice rolling.
You're probably thinking, why in the world would you do this when you can roll the dice when you play? Well....whenever we play, inevitably some good number like 6 or 8 ends up being rolled a lot less than some stinky number like 3 or 10. So then we get to discussing the accuracy of our dice and if the dice are truly giving us random rolls. Sooo, I programmed up a roller as an alternative for us to use when we play.
I went to extra effort to make sure the rolls were random by reseeding the random number generator with the number of milliseconds since epoch (Jan 1, 1970) before each and every roll of each die. This is needed because some studies have come out showing computer random number generators, really aren't that random. They're psuedo-random. And that may be good enough for Joe Blow, but not for us, hard-core-geek-freeks.
So now that its done, I submitted the application to Apple and hopefully if I didn't step on too many copyrights with regards to the game's images and references, then hopefully they'll accept it and add it to the list of Apple approved iPhone applications!!!
Above is the logo I had to create for the Apple submission and below are screen shots of the application in action... Due to real estate limitations, I couldn't use titles in the Stats View, so the first column shows actual results, second column shows expected results, and the third column shows the difference between the two.
Enjoy,
Tim.
===========
Click for PC Demo
With an iTouch or iPhone navigate to "http://www.bennettspeed.com/catan/catan.htm"
Subscribe to:
Post Comments (Atom)
4 comments:
Nice little program! Thanks!
Now if we could only play Catan on the iphone! You've gotta help get that up and running!
But isn't it funner when the stinky numbers roll more than the not stinky numbers? So then the underdog can rub it in the overdog's face? Like "HAHAHA! You thought that just because you got to place your stinkin little house first that you would be winning!! Well look who's winning now, Buddy!! Now bow down to me and beg me to trade you some ore!"
If/When I get an iPhone, I'll definitely be installing this app! Very cool, especially the stats section.
Howdy,
When ever I surf on web I never forget to visit this website[url=http://www.weightrapidloss.com/lose-10-pounds-in-2-weeks-quick-weight-loss-tips].[/url]timmay369.blogspot.com really contains lot of useful information. Let me tell you one thing guys, some time we really forget to pay attention towards our health. Here is a fact for you. Recent Scientific Research displays that almost 80% of all U.S. adults are either chubby or overweight[url=http://www.weightrapidloss.com/lose-10-pounds-in-2-weeks-quick-weight-loss-tips].[/url] Hence if you're one of these citizens, you're not alone. Its true that we all can't be like Brad Pitt, Angelina Jolie, Megan Fox, and have sexy and perfect six pack abs. Now next question is how you can achive quick weight loss? [url=http://www.weightrapidloss.com/lose-10-pounds-in-2-weeks-quick-weight-loss-tips]Quick weight loss[/url] is really not as tough as you think. Some improvement in of daily activity can help us in losing weight quickly.
About me: I am blogger of [url=http://www.weightrapidloss.com/lose-10-pounds-in-2-weeks-quick-weight-loss-tips]Quick weight loss tips[/url]. I am also health trainer who can help you lose weight quickly. If you do not want to go under painful training program than you may also try [url=http://www.weightrapidloss.com/acai-berry-for-quick-weight-loss]Acai Berry[/url] or [url=http://www.weightrapidloss.com/colon-cleanse-for-weight-loss]Colon Cleansing[/url] for effortless weight loss.
Post a Comment