Thursday, 3 April 2014

Kind of Start, Kind of Middle

I have a deck class and a card class. The card class holds the values for each card (suit and number) and the deck class includes methods for creating a deck of cards, shuffling the deck, and dealing out the cards. 

In the main method I have most of the buttons I need declared and have created two linked lists in that class for the computer's hand and the player's hand.

dealSeven()
There's a method that will deal out 7 cards to each player to start with, done with a for loop and the method that was created in the deck class. updateHand() is in this method outside of the for loop.
But two 10 of hearts is in the player's hand which isn't supposed to happen.

updateHand()
Another method is to show in a JLabel what the player's hand includes. 

I need a reset method and fix the shuffling.

No comments:

Post a Comment