Difference between revisions of "2022 - Implement a count of the cards remaining in the deck"

From TRCCompSci - AQA Computer Science
Jump to: navigation, search
(Created page with "=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....")
 
Line 7: Line 7:
 
Console.WriteLine("Current score: " + Score);
 
Console.WriteLine("Current score: " + Score);
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
 +
The number of cards remaining in the deck should be displayed after the score.
  
 
=What you need to do=
 
=What you need to do=
 
* get the number of cards remaining in the deck
 
* get the number of cards remaining in the deck
 
* create a message to say how many cards remain in the deck
 
* create a message to say how many cards remain in the deck

Revision as of 11:43, 14 November 2021

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
  • create a message to say how many cards remain in the deck