Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class PreviousHistory
- {
- public void ViewHistory()
- {
- List<string> addGames = new();
- List<string> subGames = new();
- List<string> multGames = new();
- List<string> divGames = new();
- List<string> previousHistory = new()
- {
- "Addition Games",
- "Subtraction Games",
- "Multiplication Games",
- "Division Games"
- };
- previousHistory[1].Insert(addGames);
- previousHistory[3].Insert(subGames);
- previousHistory[5].Insert(multGames);
- previousHistory[-1].Insert(divGames);
- for (int i = 0; i < previousHistory.Count; i++)
- {
- // check if item is a string -> write to console if so
- // otherwise, iterate through sub list -> write items
- }
- Console.WriteLine("Previous Games You've Played.");
- // print games here
- }
- }
Add Comment
Please, Sign In to add comment