in reply to Perl Blackjack

Its always good to try things out for yourself, as well as ask questions and look at what's already been done. I just wanted to congradulate you on doing this so cleanly. I wrote a Black Jack game as an early attempt at Perl, and it was a mess. It worked, the computer was the dealer (which has strict casino rules). I never tried adding multiple players, but I did eventually extend my card manipulation code to include Baccarat and Video Poker. Then I learned the value of OO!

Replies are listed 'Best First'.
RE: RE: Perl Blackjack
by ergowolf (Monk) on May 02, 2000 at 05:24 UTC
    I like ZZamboni's deck better than mine. It looks much more stylish and compact. However, I am concerned about sacrificing the readability and I wonder which would load faster the array or ZZamboni. My guess is yours is faster. I haven't used the Benchmark tutorial, yet. It could be a cool test. Thanks ZZamboni! That deserves some xp!

    Thanks for the complement Adam. I would like to see your code or any ideas you have on modifying mine. I try to write my perl as simply as possible. I wrote the first couple versions with all the code in the script and the deck as an array. I discovered that despite the overhead OOP and hashes were the way to go. This version is about my third or fourth start from scratch. I am mainly stuck on creating multiple players dynamically. For example, You could play 2 players the first game and 4 the next.

    I am hoping to get some more feedback or a co-author to "inspire" and work with me to finish it. Would you like to help me finish it? If your interested post back or email me off my webpage. I have never worked with someone on a programming project before. It would be interesting.

    Here are the two big benefits to completing the program I see for finishing it.

    We could make the program client server. Maybe host it on perlmonks?

    We could write a limited AI to statistaclly discover the best way to play by copying the results to a database or excel (I have done both).