Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Problem_3___Tseam_Account
- {
- class Program
- {
- static void Main(string[] args)
- {
- List<string> games = Console.ReadLine().Split(" ").ToList();
- string comand = Console.ReadLine();
- while (comand !="Play!")
- {
- string[] arr = comand.Split(' ').ToArray();
- string comandToDo = arr[0];
- string game = arr[1];
- if (comand == "Play!")
- {
- break;
- }
- switch (comandToDo) {
- case "Install":
- if (!games.Contains(game))
- {
- games.Add(game);
- foreach (var item in games)
- {
- Console.WriteLine(string.Join(' ', item));
- }
- }
- break;
- case "Uninstall":
- if (games.Contains(game))
- {
- games.Remove(game);
- foreach (var item in games)
- {
- Console.WriteLine(string.Join(' ', item));
- }
- }
- break;
- case "Update":
- if (games.Contains(game))
- {
- games.Remove(game);
- games.Add(game);
- }
- foreach (var item in games)
- {
- Console.Write(string.Join(" ",item));
- }
- break;
- case "Expansion":
- string[] Exppend = arr[1].Split("-").ToArray();
- string gametoExpend = Exppend[0];
- string expend = ":"+ Exppend[1];
- if (games.Contains(gametoExpend))
- {
- }
- break;
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement