Intermediate ColdFusion Contest!
After the success of the first ColdFusion contest, I have decided to go ahead and run a second contest. As before, it will involve games because, well, I think games are cool, and by their very nature games present many interesting challenges.
This contest will be for intermediate developers. As before, I'm going to count on your honesty. If you are a ColdFusion Ninja, than wait till the next contest. (I have what I think is an uber cool idea for that one.) This contest will be to create a Blackjack game. In order to make the design a bit easier, I found this url, which contains card images that are free for anyone to use. All entries must use one of these card sets. Now for the particulars:
- I am not a professional gambler, so the following rules will be a subset of "real" Blackjack games.
- Every Blackjack game will begin by having two cards given to the player, and two cards given to computer. One card should be handed out at a time. One of the computer's cards will be visible.
- The player goes first. The player has two options. They can either "hit", which means ask for a new card, or "stay", at which point the computer takes over.
- The point of Blackjack is to get as close to 21 points as possible. If you go over 21 points, your game is over.
- Aces can be either one or eleven.
- If the computer and the player tie, the computer (dealer) wins.
- The computer must hit if the value of it's hand is less than 17. Once the value becomes 17 or higher, the dealer must stay.
- There is no "double down", "splitting pairs", or getting 5 cards for an automatic win. Again - I want to keep things simple.
- The game must use session management and track your progress though multiple hands. It is up to you to decide how much money to give the player.
- You do not need to keep track of cards after a hand. In other words, you can reshuffle for each hand.
Design is not important - however - there were some cool design tricks I saw in the last design that I thought worked well. These weren't "artsy" things, but UI things that improved the game. I hope that distinction makes sense. Contest entries should be emailed to me at ray@camdenfamily.com. The deadline is two weeks from today, November 13th.
Oh - so I bet you want to know what the prize is? Well, it's just a small little piece of software... a full copy of ColdFusion MX Standard, a 1,299 dollar value. Big thanks go to Macromedia for sponsoring this prize.
If you have any questions on the rules, please post it here so everyone can benefit from it - and with that - good luck!
Edited: Just a quick note as I don't think I made it obvious. You will start the player with a certain amount of money. For each hand the player decides how much they want to bet, and obviously it must be less than or equal to what they have in their bank.
Comments
Simon - Well - it's up in the air I mean - if you feel like you know CF and are 'decent' at it, I'd probably consider that intermediate. You and I would NOT be considered intermediate. As for Hal, I don't think I'd even let him in on the advanced contest - it wouldn't be fair. :)
Matt - Are you joking? I certainly don't plan on reselling any of this, but as before, the code WILL be shared.
I think I’ll take a shot at the Ninja level; very curious to see what Ray or Simon have in mind.
Derek P - I won't say it doesn't matter - because I tend to view the use of CFCs as a good thing, but it is up to you.
For example, if the dealer has an Ace and a 6 he/she holds either a 7 or a 17. Does the dealer have to stay, or is there the option of playing the Ace low and taking another card?
> real blackjack rather than how good you are of a coder.
> Anybody else feel the same?
I feel quite the opposite, actually. Ray has simplified the game in a number of ways that differ from the "real blackjack": only one player, no doubling down or splitting, only one deck instead of a show of many decks, and reshuffling after each hand.
After just a few hours of thought I can see that this contest will end up being a lot more complex that I first thought, and that has absolutely nothing to do with the mechanics of blackjack itself.
Just my 2 cents.
tw
DRE
Now - um - it is based on purely personal feelings. That's not very fair, but hey, this whole contest is -mainly- for educational purposes - so I can share how people solve problems and dissect the entries.
creativity on your part is part of the game.
tony
my feeling (for whatever it's worth) is that this is a CF contest. Yeah, you could do it with no page reloads...but now it's a JS app...not CF.
Ideally, I get what you're saying about page refreshes. If I were building this as a commercial app (because the world needs another blackjack game), I would probably want to see it in JS (or AJAX), or even Flash/Flex.
But the gist of the contest here is to see how we all do it using CF.
err...um...now that i scroll up and read a bit...yeah, what Weeg said :)
so far the only JS i've added to mine is some client side validation to make sure the bet amount is numeric (and less than the total player amount).
</ $0.02> :)
Thanks for the feedback. After reading your post I can agree 100%. I guess when faced with a problem I am always look for the best solution and not the right one, something I need to get better at :)
Mine will be done by the weekend, good luck everyone.
In my app, the initial 4 cards are shown at once (1 dealer card face down, of course), but they dealt behind the scenes one at a time. I think this is what you meant, but just to clarify.


I'll send you my written code within a few days!