сделаны лаба 3,лаба 4 и стейджи 2,3

This commit is contained in:
Anna
2026-09-30 19:18:24 +03:00
parent cccf2c598d
commit 9e379bdc48
6 changed files with 515 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
# Лабораторная работа №2
* **Студент:** Хорошилкина Анна Дмитриевна
* **Вариант / Карточка:** [Например: #025 Pikachu]
---
## Ключевой код
```csharp
// Самая важная часть реализации (методы, структуры, логика)
public class Card
{
public string Name { get; set; }
public int Hp { get; set; }
}
+48
View File
@@ -0,0 +1,48 @@
using System;
using System.Collections.Generic;
class Program
{
static void Main()
{
string[] activeTeam = new string[3];
Console.WriteLine("=== РЕГИСТРАЦИЯ КОМАНДЫ ===");
for (int i = 0; i < 3; i++)
{
Console.Write("Введите имя покемона №" + (i + 1) + ": ");
activeTeam[i] = Console.ReadLine();
}
Console.WriteLine("\n--- Ваша команда на этот бой ---");
Console.WriteLine("1. " + activeTeam[0]);
Console.WriteLine("2. " + activeTeam[1]);
Console.WriteLine("3. " + activeTeam[2]);
Console.WriteLine();
List<string> backpack = new List<string>();
backpack.Add("Зелье HP");
backpack.Add("Покебол");
backpack.Add("Антидот");
Console.WriteLine("=== ИНВЕНТАРЬ ТРЕНЕРА ===");
Console.WriteLine("Вы положили вещи в сумку. Предметов в инвентаре: " + backpack.Count);
backpack.Remove("Покебол");
Console.WriteLine("Вы использовали один Покебол для поимки дикого покемона!");
Console.WriteLine("Обновленный инвентарь. Осталось предметов: " + backpack.Count);
Console.WriteLine("\n--- Содержимое вашей сумки ---");
foreach (string item in backpack)
{
Console.WriteLine("[Предмет] -> " + item);
}
Console.WriteLine("=============================");
}
}