2022 - Add a retrieve card

From TRCCompSci - AQA Computer Science
Revision as of 10:45, 14 November 2021 by Admin (talk | contribs) (Task)
Jump to: navigation, search

Task

Create a new card child class for a Retrieve card.

If a player draws a retrieve card they are able to retrieve one card from the discard pile and return it to their hand.

There should be two retrieve cards in the deck. These should be added like the difficulty cards, and should be added after the user draws their hand.

What you need to do

  • Create a subclass of Card called RetrieveCard (look at DifficultyCard)
  • Look at how DifficultyCards are added to the deck (find the SetupGame & AddDifficultyCardsToDeck methods)
  • Add the code to create 2 RetrieveCards, and add them to the deck before they are shuffled
  • Find the GetCardFromDeck method, look at the 'if (Deck.GetCardDescriptionAt(0) == "Dif")'
  • Add the code to GetCardFromDeck that will process a RetrieveCard