//Check DrawPile for reset requirement public void CheckDrawPile() { if (drawPile.GetCount() == 0) { drawPile = Crazy_Eight_Game.ResetDrawPile(discardPile); discardPile = Crazy_Eight_Game.SetDiscardPile(drawPile); UpdateTopCardImage(); } }
}//end CrazyEightsForm //Setup Game - On 'Deal btn' public void SetupGame() { //Create a deck, shuffle and use as drawPile drawPile = Crazy_Eight_Game.SetDrawPile(); //deal the cards from the draw pile DealCards(); //Start the discard pile using card from draw pile discardPile = Crazy_Eight_Game.SetDiscardPile(drawPile); //Get showing discard pile card value topCard = discardPile.GetLastCardInPile(); //start player turn PlayerTurn(); //update hand images for both player and computer UpdateHandImages(playerHand, true); UpdateHandImages(computerHand, false); UpdateTopCardImage(); }