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.
Comment 1 written by Matt on 30 October 2005, at 2:22 PM
I'll send you my written code within a few days!
Comment 2 written by Simon Horwith on 30 October 2005, at 2:59 PM
Comment 3 written by Matt on 30 October 2005, at 3:03 PM
Comment 4 written by Raymond Camden on 30 October 2005, at 3:26 PM
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.
Comment 5 written by Matt on 30 October 2005, at 3:29 PM
Comment 6 written by Rob Gonda on 30 October 2005, at 3:49 PM
I think I’ll take a shot at the Ninja level; very curious to see what Ray or Simon have in mind.
Comment 7 written by Raymond Camden on 30 October 2005, at 3:59 PM
Comment 8 written by Ryan Guill on 30 October 2005, at 4:25 PM
Comment 9 written by Simon Horwith on 30 October 2005, at 4:51 PM
Comment 10 written by Matt on 30 October 2005, at 5:32 PM
Comment 11 written by Rob Gonda on 30 October 2005, at 6:27 PM
Comment 12 written by Jason on 30 October 2005, at 8:20 PM
Comment 13 written by Derek P on 31 October 2005, at 12:34 AM
Comment 14 written by Raymond Camden on 31 October 2005, at 5:24 AM
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.
Comment 15 written by Andy Matthews on 31 October 2005, at 8:26 AM
Comment 16 written by Raymond Camden on 31 October 2005, at 8:33 AM
Comment 17 written by Seth Petry-Johnson on 31 October 2005, at 10:48 AM
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?
Comment 18 written by Raymond Camden on 31 October 2005, at 10:57 AM
Comment 19 written by Damon Gentry on 31 October 2005, at 11:47 AM
Comment 20 written by Matt on 31 October 2005, at 11:55 AM
Comment 21 written by Seth Petry-Johnson on 31 October 2005, at 12:00 PM
> 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.
Comment 22 written by Raymond Camden on 31 October 2005, at 12:43 PM
Comment 23 written by Matt on 31 October 2005, at 12:45 PM
Comment 24 written by tony of the weeg clan on 31 October 2005, at 8:25 PM
Comment 25 written by Raymond Camden on 31 October 2005, at 8:32 PM
Comment 26 written by Jason on 1 November 2005, at 5:02 PM
Comment 27 written by tony of the weeg clan on 1 November 2005, at 5:20 PM
tw
Comment 28 written by Raymond Camden on 1 November 2005, at 7:49 PM
Comment 29 written by Jason on 1 November 2005, at 8:27 PM
Comment 30 written by dre on 2 November 2005, at 1:19 PM
DRE
Comment 31 written by Raymond Camden on 2 November 2005, at 1:30 PM
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.
Comment 32 written by Uipko on 3 November 2005, at 3:04 AM
Comment 33 written by Raymond Camden on 3 November 2005, at 8:38 AM
Comment 34 written by Daniel Ness on 3 November 2005, at 3:19 PM
Comment 35 written by tony of the weeg clan on 3 November 2005, at 3:25 PM
creativity on your part is part of the game.
tony
Comment 36 written by Raymond Camden on 3 November 2005, at 3:26 PM
Comment 37 written by dan on 3 November 2005, at 3:48 PM
Comment 38 written by tony of the weeg clan on 3 November 2005, at 3:50 PM
Comment 39 written by dan on 3 November 2005, at 3:55 PM
Comment 40 written by tony of the weeg clan on 3 November 2005, at 5:26 PM
Comment 41 written by charlie griefer on 3 November 2005, at 7:11 PM
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> :)
Comment 42 written by dan on 3 November 2005, at 8:21 PM
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.
Comment 43 written by Scott on 9 November 2005, at 1:42 PM
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.
Comment 44 written by Raymond Camden on 10 November 2005, at 2:10 PM
Comment 45 written by Rob Brooks-Bilson on 17 November 2005, at 10:00 PM
[Add Comment] [Subscribe to Comments]