Count the number of player instructions

From TRCCompSci - AQA Computer Science
Revision as of 10:57, 18 December 2018 by OliverBriggs17 (talk | contribs) (Created page with "Player instruction counter in order to create a player instruction counter we will first need to define a variable to count this in an area of the program which does not loop...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Player instruction counter

in order to create a player instruction counter we will first need to define a variable to count this in an area of the program which does not loop e.g. (int instructions = 0;) you then need to increment and output it. (instructions++) and (Console.Writeline("you have used " + instructions + " moves")) I chose to put this in the PlayGame method of the program