From bc5abadc96631e26cd675f199035f881767d4058 Mon Sep 17 00:00:00 2001 From: slava_mastio228 Date: Mon, 7 Sep 2026 23:09:37 +0300 Subject: [PATCH] done ex. 2.2 --- works/lab-02/src/lab2_2.2.cs | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 works/lab-02/src/lab2_2.2.cs diff --git a/works/lab-02/src/lab2_2.2.cs b/works/lab-02/src/lab2_2.2.cs new file mode 100644 index 0000000..7679e28 --- /dev/null +++ b/works/lab-02/src/lab2_2.2.cs @@ -0,0 +1,36 @@ +namespace DefaultNamespace; + +public class lab2_2_2 +{ + static void Main(string[] args) + { + Console.WriteLine("1 - Атака"); + Console.WriteLine("2 - Инвентарь"); + Console.WriteLine("3 - Сменить покемона"); + Console.WriteLine("4 - Побег"); + Console.WriteLine(); + Console.Write("Выберете действие которое хотите совершить:"); + int x = int.Parse(Console.ReadLine()); + Console.WriteLine(); + + + switch (x) + { + case 1: + Console.WriteLine("Покемон наносит быстрый удар!"); + break; + case 2: + Console.WriteLine("Вы открыли сумку и применили Зелье Лечения."); + break; + case 3: + Console.WriteLine("Вы отозвали покемона и выпустили нового!"); + break; + case 4: + Console.WriteLine("Вы успешно сбежали из боя!"); + break; + default: + Console.WriteLine( "Неизвестная команда! Вы пропустили ход."); + break; + } + } +} \ No newline at end of file