DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: NANY 2011 Release: BlackJack  (Read 36,598 times)

kyrathaba

  • N.A.N.Y. Organizer
  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 3,200
    • Participated in NANY Challenge Eight Times
    • Programming School - Deluxe Bonus Medal
    • Programming School - Stage 1 Medal
    • Coding Snacks
    • Military Service Badge - US Army
    • Writer
NANY 2011 Release: BlackJack
« on: December 18, 2010, 09:14 PM »
NANY 2011 Entry Information

Application Name BlackJack
Version 1.1
Short Description my implementation of the classic Black Jack card game
Supported OSes Windows XP forward
Download Link A link to the game executable (no setup) {won't function if you don't have .NET Framework 4.0 installed} (~117 Kb)
Setup File A link to the Setup program {will check for absence of .NET Framework 4.0 and download if needed} (419 Kb)
System Requirements

Author kyrathaba Profile page Kyrathaba DC page


Description
This was a project I did for C# Programming School

Destined to replace those oh-too-flashy Black Jack derivatives that have come out over the years, this minimalist implementation is a breath of fresh air! -- PC Magazine.

What!  This program is FREE!??  A crime, that's what it is!  Someone slap the developer around until he starts showing some sense and charging for this gem of genius! -- Gamasutra



Features


+ a smart-ass card Dealer
+ a functional card Class in the source code
+ ability to place bets of differing amounts based upon the first card you're dealt
+ intuitive GUI
+ source code: download link

Planned Features

+ I may add option for Vegas casino music
+ May add option to change starting Max cash available to player
+ Add ability to whip out a pistol and waste the smart-ass Dealer
+ An option for the Dealer to cheat by using a marked deck of playing cards.

I would appreciate suggestions for future features of the program.

Screenshots

MyBlackJack.png


Usage

Installation

Download and run the Setup installer. Alternatively, download the ZIP file and extract BlackJack.exe wherever you wish. Keep the directory structure intact when unzipping.  Run the program.

Using the Application

The GUI is super-intuitive.

Uninstallation

Use the uninstall Program Files menuitem; or, if you didn't use the setup installer, just delete the extracted file.

No registry entries or INI files are written by the Black Jack program itself.

Known Issues

None.


Win 10 Pro running on a 3.2 GHz CPU and 12 Gb RAM
__________________________________________

Proofreading Service: http://williammillerservices.com/proofreading

« Last Edit: March 23, 2013, 05:09 PM by kyrathaba »

Shades

  • Member
  • Joined in 2006
  • **
  • Posts: 2,954
Re: NANY 2011 Release: BlackJack
« Reply #1 on: December 18, 2010, 10:32 PM »
Unfortunately the minimal NET 2.0 requirement is false (on my XP SPIII), the minimal requirement appears to be NET 4.0.

Come to think of it...when you include a attachment to a reply on a post here in DC, there is a counter that says how many times the attachment is downloaded. I believe that was one of your questions in IRC. If there is code like that for the forum post replies, then I assume it can be used for an attachment in the original post as well.
The easy path is usually downhill...

kyrathaba

  • N.A.N.Y. Organizer
  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 3,200
    • Participated in NANY Challenge Eight Times
    • Programming School - Deluxe Bonus Medal
    • Programming School - Stage 1 Medal
    • Coding Snacks
    • Military Service Badge - US Army
    • Writer
Re: NANY 2011 Release: BlackJack
« Reply #2 on: December 18, 2010, 10:34 PM »
Thanks, Shades, I fixed the entry under "requirements".
Win 10 Pro running on a 3.2 GHz CPU and 12 Gb RAM
__________________________________________

Proofreading Service: http://williammillerservices.com/proofreading

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,931
    • Gathering Badge
    • Plugin Coding Medal
    • Participated in NANY Challenge Seventeen Times
    • Cody Award
    • Coding Snacks
    • Volunteers/Staff
Re: NANY 2011 Release: BlackJack
« Reply #3 on: December 18, 2010, 10:50 PM »
great :up:

i want to say that i think the real value of this is that it includes the source code, so C# coders can play with it and adapt it, etc.  very nice of you to provide that  :Thmbsup: :Thmbsup: :Thmbsup:
« Last Edit: December 18, 2010, 11:52 PM by mouser »

kyrathaba

  • N.A.N.Y. Organizer
  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 3,200
    • Participated in NANY Challenge Eight Times
    • Programming School - Deluxe Bonus Medal
    • Programming School - Stage 1 Medal
    • Coding Snacks
    • Military Service Badge - US Army
    • Writer
Re: NANY 2011 Release: BlackJack
« Reply #4 on: December 18, 2010, 11:17 PM »
My pleasure to provide source code.  I may use this project to do a series of C# web-lessons, showing the incremental development of the project, from start to completed app.

Mouser, I carefully went through the source code, and refactored.  If you look at my latest post under Assignment 5, you'll see a summary of changes I've made.  
Win 10 Pro running on a 3.2 GHz CPU and 12 Gb RAM
__________________________________________

Proofreading Service: http://williammillerservices.com/proofreading

« Last Edit: December 19, 2010, 03:10 AM by kyrathaba »

kyrathaba

  • N.A.N.Y. Organizer
  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 3,200
    • Participated in NANY Challenge Eight Times
    • Programming School - Deluxe Bonus Medal
    • Programming School - Stage 1 Medal
    • Coding Snacks
    • Military Service Badge - US Army
    • Writer
Re: NANY 2011 Release: BlackJack
« Reply #5 on: December 18, 2010, 11:20 PM »
Quote
C# coders can play with it and adapt it

The included Card class is quite useful. It'll work with any game that uses the standard 52-card deck of playing cards, and could easily be adapted to other card games. The class can take any size canvas image of 52 playing cards (so long as they're in the same arrangement as the one included as a project resource) and will correctly crop out individual cards. However, I'd recommend that you err on the side of larger images. You can use the "Zoom" SizeMode property for your PictureBoxes, and they'll make a larger image look pretty good, even in a smaller PictureBox; however, trying to "Zoom" small images "up" to fit larger PictureBox width x height doesn't yield such good results.  The best practice is to make your PictureBoxes the exact dimensions that each cropped-out individual card will be.  In my app, this was 119x100, or something close to that.

Here's the canvas pic I used:

classic-playing-cards.png

P.S.  I'm using Chrome (but downloading IE9 as I type).  Is Chrome responsible for inserting question marks into my posts?  Or is this some glitch from the migration?  Been noticing this behavior all day.
Win 10 Pro running on a 3.2 GHz CPU and 12 Gb RAM
__________________________________________

Proofreading Service: http://williammillerservices.com/proofreading

« Last Edit: December 19, 2010, 12:03 AM by kyrathaba »

worstje

  • The Gent with the White Hat
  • Honorary Member
  • Joined in 2009
  • **
  • Posts: 589
    • Coding Snacks
    • Participated in NANY Challenge Three Times
Re: NANY 2011 Release: BlackJack
« Reply #6 on: December 18, 2010, 11:49 PM »
P.S.  I'm using Chrome (but downloading IE9 as I type).  Is Chrome responsible for inserting question marks into my posts?  Or is this some glitch from the migration?  Been noticing this behavior all day.

I only see question marks at the end of your questions. ;) Which I hope is intentional.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,931
    • Gathering Badge
    • Plugin Coding Medal
    • Participated in NANY Challenge Seventeen Times
    • Cody Award
    • Coding Snacks
    • Volunteers/Staff
Re: NANY 2011 Release: BlackJack
« Reply #7 on: December 18, 2010, 11:52 PM »
oh damn it's happening to me too in some of my posts above.. what's going on i wonder.

kyrathaba

  • N.A.N.Y. Organizer
  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 3,200
    • Participated in NANY Challenge Eight Times
    • Programming School - Deluxe Bonus Medal
    • Programming School - Stage 1 Medal
    • Coding Snacks
    • Military Service Badge - US Army
    • Writer
Re: NANY 2011 Release: BlackJack
« Reply #8 on: December 19, 2010, 12:01 AM »
I've installed and started using IE9, and the behavior went away, but I was getting it in both Chrome and FF, seemingly when I'd use Alt-S to post, instead of clicking the Post button.  But I'm using Alt-S to post this...
Win 10 Pro running on a 3.2 GHz CPU and 12 Gb RAM
__________________________________________

Proofreading Service: http://williammillerservices.com/proofreading

kyrathaba

  • N.A.N.Y. Organizer
  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 3,200
    • Participated in NANY Challenge Eight Times
    • Programming School - Deluxe Bonus Medal
    • Programming School - Stage 1 Medal
    • Coding Snacks
    • Military Service Badge - US Army
    • Writer
Re: NANY 2011 Release: BlackJack
« Reply #9 on: December 19, 2010, 12:01 AM »
...and as you can see, no funky ??? insertion (this post also posted using Alt-S.
Win 10 Pro running on a 3.2 GHz CPU and 12 Gb RAM
__________________________________________

Proofreading Service: http://williammillerservices.com/proofreading

kyrathaba

  • N.A.N.Y. Organizer
  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 3,200
    • Participated in NANY Challenge Eight Times
    • Programming School - Deluxe Bonus Medal
    • Programming School - Stage 1 Medal
    • Coding Snacks
    • Military Service Badge - US Army
    • Writer
Re: NANY 2011 Release: BlackJack
« Reply #10 on: December 19, 2010, 12:02 AM »
BTW, the three question marks above were intentional :)
Win 10 Pro running on a 3.2 GHz CPU and 12 Gb RAM
__________________________________________

Proofreading Service: http://williammillerservices.com/proofreading

worstje

  • The Gent with the White Hat
  • Honorary Member
  • Joined in 2009
  • **
  • Posts: 589
    • Coding Snacks
    • Participated in NANY Challenge Three Times
Re: NANY 2011 Release: BlackJack
« Reply #11 on: December 19, 2010, 01:12 AM »
Ok, I figured it out a bit. Something about the edit functionality messes stuff up when saving the post and turns it into questionmark walhalla. :(

kyrathaba

  • N.A.N.Y. Organizer
  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 3,200
    • Participated in NANY Challenge Eight Times
    • Programming School - Deluxe Bonus Medal
    • Programming School - Stage 1 Medal
    • Coding Snacks
    • Military Service Badge - US Army
    • Writer
Re: NANY 2011 Release: BlackJack
« Reply #12 on: December 19, 2010, 02:45 AM »
Here's some of those mysteriously appearing question marks:

mysteriousQM.png
Win 10 Pro running on a 3.2 GHz CPU and 12 Gb RAM
__________________________________________

Proofreading Service: http://williammillerservices.com/proofreading

« Last Edit: December 19, 2010, 02:47 AM by kyrathaba »

kyrathaba

  • N.A.N.Y. Organizer
  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 3,200
    • Participated in NANY Challenge Eight Times
    • Programming School - Deluxe Bonus Medal
    • Programming School - Stage 1 Medal
    • Coding Snacks
    • Military Service Badge - US Army
    • Writer
Re: NANY 2011 Release: BlackJack
« Reply #13 on: December 20, 2010, 03:31 PM »
Note: I've amended the OP to include not only a download link for the barebones executable, but also one for an Inno Setup.

I've tested the setup on my Win7 Home Premium system, but would appreciate testing and feedback here, from XP and Vista users.

The Setup installs the additional feature of an About menu containing some explanation of the program, and a link to my DC page.

Tonight, I will update the no-install link target so that it also includes this functionality. 
Win 10 Pro running on a 3.2 GHz CPU and 12 Gb RAM
__________________________________________

Proofreading Service: http://williammillerservices.com/proofreading

« Last Edit: December 20, 2010, 03:39 PM by kyrathaba »

kyrathaba

  • N.A.N.Y. Organizer
  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 3,200
    • Participated in NANY Challenge Eight Times
    • Programming School - Deluxe Bonus Medal
    • Programming School - Stage 1 Medal
    • Coding Snacks
    • Military Service Badge - US Army
    • Writer
Re: NANY 2011 Release: BlackJack
« Reply #14 on: December 20, 2010, 10:59 PM »
The links in the OP table have been updated to point to both Inno Setup installer, and raw executable for manual install, for version 1.1 of my BlackJack application.  Please report any installation problems.  The installer works great on the WinXP and Win7 computers I've tested it on here at home.
Win 10 Pro running on a 3.2 GHz CPU and 12 Gb RAM
__________________________________________

Proofreading Service: http://williammillerservices.com/proofreading

kyrathaba

  • N.A.N.Y. Organizer
  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 3,200
    • Participated in NANY Challenge Eight Times
    • Programming School - Deluxe Bonus Medal
    • Programming School - Stage 1 Medal
    • Coding Snacks
    • Military Service Badge - US Army
    • Writer
Re: NANY 2011 Release: BlackJack
« Reply #15 on: December 22, 2010, 04:53 PM »
Tested the setup program on my dad's old WinXP Home laptop. Worked well.
Win 10 Pro running on a 3.2 GHz CPU and 12 Gb RAM
__________________________________________

Proofreading Service: http://williammillerservices.com/proofreading

Original address: https://www.donationcoder.com/forum/index.php?topic=24926.0