예제 #1
0
        private void AddInjuryToAPlayer()
        {
            PrintSpecial(Label("ADD INJURY TO A PLAYER"));

            try
            {
                Print("Id of the player:");
                int playerId = int.Parse(Console.ReadLine());
                Print("");

                Print("Injury:");
                string injuryName = Console.ReadLine();
                Print("");

                playerService.AddInjury(playerId, injuryName);

                Print("Injury added successfully!");
            }
            catch (ArgumentException e)
            {
                Print(e.Message);
            }
            catch (Exception)
            {
                Print(SomethingWentWrong());
            }
        }