2022 - Implement a count of the cards remaining in the deck

From TRCCompSci - AQA Computer Science
Jump to: navigation, search

Issue

A player loses if they run out of cards in the deck without solving the locks. However the program doesn't give any indication of how many cards are left in the deck.

Find the PlayGame method of the BreakThrough class, originally on line number 60 is this line:

Console.WriteLine("Current score: " + Score);

The number of cards remaining in the deck should be displayed after the score.

What you need to do

  • get the number of cards remaining in the deck (deck.GetNumberOfCards())
  • create a message to say how many cards remain in the deck