I would like help finishing this, this is what my professor is looking for.
Basic Game Rules:
OBJECT OF THE GAME
The goal is to be the first player to get rid of all the cards in your hand.
The Play
A card is placed face up on the starter pile. Each card played (other than an eight) must match the card showing on the starter pile, either in suit or in denomination. When the Player presses button of any card then discard that card on to the top of the file and put the back of card image to show that card is discarded. When all 5 cards are discarded (all images are the back of the card) then that person wins game.
Example: If the Queen of Clubs is the starter, any club may be played on it or any Queen. All eights are wild! That is, an eight may be played at any time in turn.
If Player is unable to play, press the HIT Button:
(1) which finds any card in Player's hand that is "discarded" (the back of the card is showing) and deals a card to that index spot , thus replaces it with one from the deck.
(2) If unable to play when all of your cards are showing, the player must pass control to the dealer (call dealer Play method), this should happen when the Player Presses the HIT button and the hit button can not do anything.
Each time the Player discards a card it is the dealer's turn to play.
If both dealer and player are stuck (they can not go and have 5 cards) then press the purple button which deals a card from the deck to the top of the pile. It is then the Player's turn. Note, both players can only hit until they reach 5 cards if both have 5 cards and can not go then User must press purple button which puts a new card on the discard pile from the deck. Note: You only deal a new card to a single empty (discarded) slot then evaluate, if you need to hit again then hit again but remember your goal is to get rid of all cards... so only hit (one at a time). when you can not discard.
Notes: Suggestion, Get the Player to work first then work on Dealer Play code which is the same as the Player code (with Dealer's cards of course). You can test Player code by hitting the purple button when Player is stuck and can not move (for test), see in class Demo. If you reach the end of the deck of cards do not shuffle, the game is over.
Pressing the purple button during game play should deal a card to the top of the pile, when game is over then purple button resets to a new game.