Hello all
I've noticed that this game is done quite often by people and now it's one of my assignments. It was split into two parts, the first assignment being to create a deck of cards as an array and assign an image of each card to the corresponding suit and rank, then methods that shuffle and deal these cards.
The second assignment is the actual Blackjack game, and now I' am completely stuck. In my program I need to have a separate class for the player and dealer but I'm stuck on the dealer class. I have to initialize field numberOfPoints to 0 with a constructor, then the method deal should call the method dealCard() of class CardDeck in a loop, adding the value of each resulting card to the current value of numberOfPoints. Use the object returned by method dealCard() to call method drawCard of class PlayingCard, in order to display a picture of the card on screen. The loop terminates when value of the field numberOfPoints reaches 17 or higher. Also for simplicity, Im always to count Ace as 11 points for the dealer's hand. Lastly method handTotal() returns the value of field numberOfPoints.
Now I'm not sure how to go about implementing the loop, as it says that the cards drawn should add up, but the array of cards contained actual file images of the cards themselves so how do they have a value?
Thanks in advance.