Draw Poker
Being between projects and with the holidays coming up, I didn't want to start a deep dive into any programming project so I decided to write a draw poker game since I haven't done it before. Why do a small project that students are requently assigned to do? Just to keep my programming muscles in shape. The more I code, the better I am at it (faster, more correct code). So this is a coding workout!
I discovered some interesting programming twists when writing the code: like having to know the value of the highest card used in the hand valuation when the player and dealer have the same hand. And making Ace high had some challenges also. Good times!
I used the following card / value mapping and initialized the deck from 0 to 51. No wild cards.
I discovered some interesting programming twists when writing the code: like having to know the value of the highest card used in the hand valuation when the player and dealer have the same hand. And making Ace high had some challenges also. Good times!
I used the following card / value mapping and initialized the deck from 0 to 51. No wild cards.
Below are some screen shots from the game. |
Download and execute the below file.
Note: You must have Java on your computer for this to work.
|