} //end SetUpGame /// <summary> /// Sets up the discard pile so that the first card is the top card of the draw deck, /// also the current suit is changed to that of the top cards /// Pre: drawpile needs to be initialised /// Post: Displays the Top card of the Discard pile and changes the current suit /// </summary> private static void SetUpTheDiscardPile() { discardPile = new CardPile(); //discardPile.Add(new Card(Suit.Hearts, FaceValue.Eight)); discardPile.Add(drawPile.DealOneCard()); DisplayDiscardPileTopCard(); currentSuit = discardPile.GetLastCardInPile().GetSuit(); }
/// <summary> /// Display top card of the discard pile in text /// Pre: Discardpile and a top card must be initialised /// Post: Displays the top card in the discard pile. /// </summary> public static void DisplayDiscardPileTopCard() { Trace.Write("\nThe Card on top of the discard pile is now "); Trace.WriteLine(discardPile.GetLastCardInPile().ToString(true, true)); }