This is a great starting point, keep up the good work.
Adrian Grabowski wrote:Ok, so that's how I see it, I'm a newbie so please don't laugh.
The CodeRanch BeNice
rule is in effect for all postings on CodeRanch, so no one is going to laugh.
If or when they do they risk having their post be deleted and their account be closed.
Adrian Grabowski wrote:AFAIK Blackjack uses standard 52 card deck.
The rules and setup for the game are explained in the Wiki article in the first post.
You are correct, that a 52 card deck is used, but more advanced games allow for more then one deck to be used.
You have some great properties, but objects need to interact with each other some how using actions and behaviors.
Here are some possible behaviors and/or actions to think about:
Can any player be the dealer and what does the dealer do as they are not a normal player?What does the player do as they are not the dealer?How do you determine the winner of the game?How do you determine the when the game is over?How do you determine if the player can be dealt another card? At some point in time the player will be over 21.
How would you implement game rules? The least of which is how much you can bet.
There are also different game rules and styles as list in the Wikipedia for those who want to go into more advanced programming/options.
It is also important to not over complicate things. Sometimes you may not need an inner class or inner interface or feature x.
Some features help with unit testing, but may not help with program design and vice versa.
Once again, I think you have a great start and this planning phase can last anywhere from five minutes to a few hours for some projects so it is very important that this step not be skipped for any project.
That said, it is not uncommon for the final objects/coding to not use follow the first plan all the way.
This plan will be constantly refreshed as the needs on the project/client change and as the understanding of the project increases.
I will post my objects definitions in a few days, which may not be the same as yours. Yours can be right, and mine can be right both at the same time because we are working on separate projects.