Advertisement
Alexander_Maximov

Untitled

Mar 16th, 2023
369
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.80 KB | None | 0 0
  1. using System;
  2.  
  3. namespace GladiatorFight
  4. {
  5.     public class UserInput
  6.     {
  7.         public string GetInputLeftFighterName()
  8.         {
  9.             Console.ForegroundColor = ConsoleColor.Red;
  10.             Console.Write("Выберите бойца левых ворот (напишите имя):  ");
  11.             string userInput = Console.ReadLine();
  12.             Console.ResetColor();
  13.  
  14.             return userInput;
  15.         }
  16.        
  17.         public string GetInputRightFighterName()
  18.         {
  19.             Console.ForegroundColor = ConsoleColor.Green;
  20.             Console.Write("Выберите бойца правых ворот (напишите имя):  ");
  21.             string userInput = Console.ReadLine();
  22.             Console.ResetColor();
  23.  
  24.             return userInput;
  25.         }
  26.     }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement