generated from admin/template
feat: выполнена лабораторная работа 2, внесены корректировки в лр 1
This commit is contained in:
@@ -0,0 +1,73 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace lesson2
|
||||
{
|
||||
internal class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
//блок 1 задание 1
|
||||
//Console.WriteLine("=== Прокачка покемона ===");
|
||||
//Console.Write("Введите базовое значение атаки покемона: ");
|
||||
//int attackBase = int.Parse(Console.ReadLine());
|
||||
//Console.Write("\nВведите уровень покемона: ");
|
||||
//int level = int.Parse(Console.ReadLine());
|
||||
//Console.WriteLine($"\nИтоговая атака этого покемона: {attackBase + (level*5)}");
|
||||
|
||||
//блок 1 задание 2
|
||||
//int trenerBalance = 1500;
|
||||
//int potionPrice = 200;
|
||||
//Console.WriteLine($"Текущий баланс тренера: {trenerBalance}");
|
||||
//Console.Write("Введите количество приобретаемых зелий: ");
|
||||
//var potionCount = int.Parse(Console.ReadLine());
|
||||
//int potionCost = potionPrice * potionCount;
|
||||
//trenerBalance -= potionCost;
|
||||
//Console.WriteLine($"\nПокупка успешно совершена. Остаток монет на балансе: {trenerBalance}");
|
||||
|
||||
//БЛОК 2 задание 2.1
|
||||
//Console.Write("Введите текущее количество HP покемона: ");
|
||||
//int pokemonHealth = int.Parse(Console.ReadLine());
|
||||
//Console.WriteLine();
|
||||
//if (pokemonHealth <= 0)
|
||||
// Console.WriteLine("Покемон потерял сознание! Верните его в покебол.");
|
||||
//else if (pokemonHealth <= 20)
|
||||
// Console.WriteLine("Критическое состояние! Срочно используйте зелье!");
|
||||
//else if (pokemonHealth <= 50)
|
||||
// Console.WriteLine("Покемон ранен, будьте осторожны.");
|
||||
//else
|
||||
// Console.WriteLine("Покемон полон сил и готов к бою!");
|
||||
|
||||
//БЛОК задание 2.2
|
||||
Console.WriteLine("=== МЕНЮ КОМАНД ===");
|
||||
Console.WriteLine("1 — Атака\n2 — Инвентарь\n3 — Сменить покемона\n4 — Побег");
|
||||
Console.Write("Введите номер выбранного действия: ");
|
||||
int menuSelection = int.Parse(Console.ReadLine());
|
||||
Console.WriteLine();
|
||||
{
|
||||
switch (menuSelection)
|
||||
{
|
||||
case 1:
|
||||
Console.WriteLine("Покемон наносит быстрый удар!");
|
||||
break;
|
||||
case 2:
|
||||
Console.WriteLine("Вы открыли сумку и применили Зелье Лечения.");
|
||||
break;
|
||||
case 3:
|
||||
Console.WriteLine("Вы отозвали покемона и выпустили нового!");
|
||||
break;
|
||||
case 4:
|
||||
Console.WriteLine("Вы успешно сбежали из боя!");
|
||||
break;
|
||||
default:
|
||||
Console.WriteLine("Неизвестная команда! Вы пропустили ход.");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user