diff --git a/Charp/lab-03/.vs/ProjectEvaluation/lab-03.metadata.v9.bin b/Charp/lab-03/.vs/ProjectEvaluation/lab-03.metadata.v9.bin deleted file mode 100644 index 54d4e46..0000000 Binary files a/Charp/lab-03/.vs/ProjectEvaluation/lab-03.metadata.v9.bin and /dev/null differ diff --git a/Charp/lab-03/.vs/ProjectEvaluation/lab-03.projects.v9.bin b/Charp/lab-03/.vs/ProjectEvaluation/lab-03.projects.v9.bin deleted file mode 100644 index c270028..0000000 Binary files a/Charp/lab-03/.vs/ProjectEvaluation/lab-03.projects.v9.bin and /dev/null differ diff --git a/Charp/lab-03/.vs/ProjectEvaluation/lab-03.strings.v9.bin b/Charp/lab-03/.vs/ProjectEvaluation/lab-03.strings.v9.bin deleted file mode 100644 index f4bd653..0000000 Binary files a/Charp/lab-03/.vs/ProjectEvaluation/lab-03.strings.v9.bin and /dev/null differ diff --git a/Charp/lab-03/.vs/lab-03/DesignTimeBuild/.dtbcache.v2 b/Charp/lab-03/.vs/lab-03/DesignTimeBuild/.dtbcache.v2 deleted file mode 100644 index 99d701b..0000000 Binary files a/Charp/lab-03/.vs/lab-03/DesignTimeBuild/.dtbcache.v2 and /dev/null differ diff --git a/Charp/lab-03/.vs/lab-03/FileContentIndex/051c2bea-141b-4df9-b0d8-7591c6bd1432.vsidx b/Charp/lab-03/.vs/lab-03/FileContentIndex/051c2bea-141b-4df9-b0d8-7591c6bd1432.vsidx deleted file mode 100644 index b16a653..0000000 Binary files a/Charp/lab-03/.vs/lab-03/FileContentIndex/051c2bea-141b-4df9-b0d8-7591c6bd1432.vsidx and /dev/null differ diff --git a/Charp/lab-03/.vs/lab-03/v17/.futdcache.v2 b/Charp/lab-03/.vs/lab-03/v17/.futdcache.v2 deleted file mode 100644 index b790abc..0000000 Binary files a/Charp/lab-03/.vs/lab-03/v17/.futdcache.v2 and /dev/null differ diff --git a/Charp/lab-03/.vs/lab-03/v17/DocumentLayout.backup.json b/Charp/lab-03/.vs/lab-03/v17/DocumentLayout.backup.json deleted file mode 100644 index ccb5383..0000000 --- a/Charp/lab-03/.vs/lab-03/v17/DocumentLayout.backup.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "Version": 1, - "WorkspaceRootPath": "C:\\prog-radzh\\works\\Csharp\\lab-03\\", - "Documents": [ - { - "AbsoluteMoniker": "D:0:0:{90AD7B65-770E-4FB3-BC44-2FC8A293FDDE}|lab-03\\lab-03.csproj|c:\\prog-radzh\\works\\csharp\\lab-03\\lab-03\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{90AD7B65-770E-4FB3-BC44-2FC8A293FDDE}|lab-03\\lab-03.csproj|solutionrelative:lab-03\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - } - ], - "DocumentGroupContainers": [ - { - "Orientation": 0, - "VerticalTabListWidth": 256, - "DocumentGroups": [ - { - "DockedWidth": 200, - "SelectedChildIndex": 0, - "Children": [ - { - "$type": "Document", - "DocumentIndex": 0, - "Title": "Program.cs", - "DocumentMoniker": "C:\\prog-radzh\\works\\Csharp\\lab-03\\lab-03\\Program.cs", - "RelativeDocumentMoniker": "lab-03\\Program.cs", - "ToolTip": "C:\\prog-radzh\\works\\Csharp\\lab-03\\lab-03\\Program.cs", - "RelativeToolTip": "lab-03\\Program.cs", - "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", - "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2026-09-08T18:49:46.902Z", - "EditorCaption": "" - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/Charp/lab-03/.vs/lab-03/v17/DocumentLayout.json b/Charp/lab-03/.vs/lab-03/v17/DocumentLayout.json deleted file mode 100644 index 50e971a..0000000 --- a/Charp/lab-03/.vs/lab-03/v17/DocumentLayout.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "Version": 1, - "WorkspaceRootPath": "C:\\prog-radzh\\works\\Csharp\\lab-03\\", - "Documents": [ - { - "AbsoluteMoniker": "D:0:0:{90AD7B65-770E-4FB3-BC44-2FC8A293FDDE}|lab-03\\lab-03.csproj|c:\\prog-radzh\\works\\csharp\\lab-03\\lab-03\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{90AD7B65-770E-4FB3-BC44-2FC8A293FDDE}|lab-03\\lab-03.csproj|solutionrelative:lab-03\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - } - ], - "DocumentGroupContainers": [ - { - "Orientation": 0, - "VerticalTabListWidth": 256, - "DocumentGroups": [ - { - "DockedWidth": 200, - "SelectedChildIndex": 0, - "Children": [ - { - "$type": "Document", - "DocumentIndex": 0, - "Title": "Program.cs", - "DocumentMoniker": "C:\\prog-radzh\\works\\Csharp\\lab-03\\lab-03\\Program.cs", - "RelativeDocumentMoniker": "lab-03\\Program.cs", - "ToolTip": "C:\\prog-radzh\\works\\Csharp\\lab-03\\lab-03\\Program.cs", - "RelativeToolTip": "lab-03\\Program.cs", - "ViewState": "AgIAAAAAAAAAAAAAAAAAACEAAAAAAAAAAAAAAA==", - "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2026-09-08T18:49:46.902Z", - "EditorCaption": "" - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/Charp/lab-03/Readme.md b/Charp/lab-03/Readme.md deleted file mode 100644 index e69de29..0000000 diff --git a/Charp/lab-03/lab-03.sln b/Charp/lab-03/lab-03.sln deleted file mode 100644 index 5a7a662..0000000 --- a/Charp/lab-03/lab-03.sln +++ /dev/null @@ -1,25 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.14.37614.0 d17.14 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "lab-03", "lab-03\lab-03.csproj", "{90AD7B65-770E-4FB3-BC44-2FC8A293FDDE}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {90AD7B65-770E-4FB3-BC44-2FC8A293FDDE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {90AD7B65-770E-4FB3-BC44-2FC8A293FDDE}.Debug|Any CPU.Build.0 = Debug|Any CPU - {90AD7B65-770E-4FB3-BC44-2FC8A293FDDE}.Release|Any CPU.ActiveCfg = Release|Any CPU - {90AD7B65-770E-4FB3-BC44-2FC8A293FDDE}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {4E2974E8-28C9-47E5-99A5-F84249F3DF3C} - EndGlobalSection -EndGlobal diff --git a/Charp/lab-03/lab-03/Program.cs b/Charp/lab-03/lab-03/Program.cs deleted file mode 100644 index e220570..0000000 --- a/Charp/lab-03/lab-03/Program.cs +++ /dev/null @@ -1,44 +0,0 @@ -// task 1 -/* -string pokemon1Name = "Пикачу"; -int pokemon1Hp = 50; -int pokemon1Attack = 12; -string pokemon2Name = "Булбазавр"; -int pokemon2Hp = 55; -int pokemon2Attack = 10; -int roundNumber = 1; - -Console.WriteLine("Приготовьтесь!"); -for (int i = 3 ; i >= roundNumber ; i--) -{ - Console.WriteLine(i + "..."); - Thread.Sleep(1000); -} -Console.WriteLine("=== БОЙ НАЧИНАЕТСЯ ==="); -Console.WriteLine($"{pokemon1Name} (HP: {pokemon1Hp} | Атака: {pokemon1Attack}) VS {pokemon2Name} (HP: {pokemon2Hp} | Атака: {pokemon2Attack})"); -*/ - -// task 2 - -using System.ComponentModel.Design; - -int choice; -Console.Write("Готовы начать бой? (1 - Да, 0 - Нет): "); - -do -{ - choice = int.Parse(Console.ReadLine()); - if (choice == 1) - { - Console.WriteLine("Вы начали бой!"); - } - - else if (choice == 0) - { - Console.WriteLine("Вы отменили бой!"); - } - else - { - Console.WriteLine("Некорректная команда! Попробуйте снова."); - } -} while (choice != 1 && choice != 0); diff --git a/Charp/lab-03/lab-03/lab-03.csproj b/Charp/lab-03/lab-03/lab-03.csproj deleted file mode 100644 index a676991..0000000 --- a/Charp/lab-03/lab-03/lab-03.csproj +++ /dev/null @@ -1,11 +0,0 @@ - - - - Exe - net9.0 - lab_03 - enable - enable - - - diff --git a/Charp/lab-03/lab-03/obj/Debug/net9.0/.NETCoreApp,Version=v9.0.AssemblyAttributes.cs b/Charp/lab-03/lab-03/obj/Debug/net9.0/.NETCoreApp,Version=v9.0.AssemblyAttributes.cs deleted file mode 100644 index feda5e9..0000000 --- a/Charp/lab-03/lab-03/obj/Debug/net9.0/.NETCoreApp,Version=v9.0.AssemblyAttributes.cs +++ /dev/null @@ -1,4 +0,0 @@ -// -using System; -using System.Reflection; -[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v9.0", FrameworkDisplayName = ".NET 9.0")] diff --git a/Charp/lab-03/lab-03/obj/Debug/net9.0/lab-03.AssemblyInfo.cs b/Charp/lab-03/lab-03/obj/Debug/net9.0/lab-03.AssemblyInfo.cs deleted file mode 100644 index 843ceec..0000000 --- a/Charp/lab-03/lab-03/obj/Debug/net9.0/lab-03.AssemblyInfo.cs +++ /dev/null @@ -1,22 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -using System; -using System.Reflection; - -[assembly: System.Reflection.AssemblyCompanyAttribute("lab-03")] -[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] -[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] -[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+494da37720a35a8e6f1afbe4a8830aa4493c43b7")] -[assembly: System.Reflection.AssemblyProductAttribute("lab-03")] -[assembly: System.Reflection.AssemblyTitleAttribute("lab-03")] -[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] - -// Generated by the MSBuild WriteCodeFragment class. - diff --git a/Charp/lab-03/lab-03/obj/Debug/net9.0/lab-03.AssemblyInfoInputs.cache b/Charp/lab-03/lab-03/obj/Debug/net9.0/lab-03.AssemblyInfoInputs.cache deleted file mode 100644 index c705d83..0000000 --- a/Charp/lab-03/lab-03/obj/Debug/net9.0/lab-03.AssemblyInfoInputs.cache +++ /dev/null @@ -1 +0,0 @@ -deb11dc12e69503452c0048f81f5a7a5538b6575cb69d80def424034c77d25a7 diff --git a/Charp/lab-03/lab-03/obj/Debug/net9.0/lab-03.GeneratedMSBuildEditorConfig.editorconfig b/Charp/lab-03/lab-03/obj/Debug/net9.0/lab-03.GeneratedMSBuildEditorConfig.editorconfig deleted file mode 100644 index 72884ed..0000000 --- a/Charp/lab-03/lab-03/obj/Debug/net9.0/lab-03.GeneratedMSBuildEditorConfig.editorconfig +++ /dev/null @@ -1,18 +0,0 @@ -is_global = true -build_property.TargetFramework = net9.0 -build_property.TargetFrameworkIdentifier = .NETCoreApp -build_property.TargetFrameworkVersion = v9.0 -build_property.TargetPlatformMinVersion = -build_property.UsingMicrosoftNETSdkWeb = -build_property.ProjectTypeGuids = -build_property.InvariantGlobalization = -build_property.PlatformNeutralAssembly = -build_property.EnforceExtendedAnalyzerRules = -build_property.EntryPointFilePath = -build_property._SupportedPlatformList = Linux,macOS,Windows -build_property.RootNamespace = lab_03 -build_property.ProjectDir = Z:\prog-radzh\works\Csharp\lab-03\lab-03\ -build_property.EnableComHosting = -build_property.EnableGeneratedComInterfaceComImportInterop = -build_property.EffectiveAnalysisLevelStyle = 9.0 -build_property.EnableCodeStyleSeverity = diff --git a/Charp/lab-03/lab-03/obj/Debug/net9.0/lab-03.GlobalUsings.g.cs b/Charp/lab-03/lab-03/obj/Debug/net9.0/lab-03.GlobalUsings.g.cs deleted file mode 100644 index d12bcbc..0000000 --- a/Charp/lab-03/lab-03/obj/Debug/net9.0/lab-03.GlobalUsings.g.cs +++ /dev/null @@ -1,8 +0,0 @@ -// -global using System; -global using System.Collections.Generic; -global using System.IO; -global using System.Linq; -global using System.Net.Http; -global using System.Threading; -global using System.Threading.Tasks; diff --git a/Charp/lab-03/lab-03/obj/Debug/net9.0/lab-03.assets.cache b/Charp/lab-03/lab-03/obj/Debug/net9.0/lab-03.assets.cache deleted file mode 100644 index c2ce4ad..0000000 Binary files a/Charp/lab-03/lab-03/obj/Debug/net9.0/lab-03.assets.cache and /dev/null differ diff --git a/Charp/lab-03/lab-03/obj/lab-03.csproj.nuget.dgspec.json b/Charp/lab-03/lab-03/obj/lab-03.csproj.nuget.dgspec.json deleted file mode 100644 index 151c09a..0000000 --- a/Charp/lab-03/lab-03/obj/lab-03.csproj.nuget.dgspec.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "format": 1, - "restore": { - "Z:\\prog-radzh\\works\\Csharp\\lab-03\\lab-03\\lab-03.csproj": {} - }, - "projects": { - "Z:\\prog-radzh\\works\\Csharp\\lab-03\\lab-03\\lab-03.csproj": { - "version": "1.0.0", - "restore": { - "projectUniqueName": "Z:\\prog-radzh\\works\\Csharp\\lab-03\\lab-03\\lab-03.csproj", - "projectName": "lab-03", - "projectPath": "Z:\\prog-radzh\\works\\Csharp\\lab-03\\lab-03\\lab-03.csproj", - "packagesPath": "C:\\Users\\228p\\.nuget\\packages\\", - "outputPath": "Z:\\prog-radzh\\works\\Csharp\\lab-03\\lab-03\\obj\\", - "projectStyle": "PackageReference", - "configFilePaths": [ - "C:\\Users\\228p\\AppData\\Roaming\\NuGet\\NuGet.Config" - ], - "originalTargetFrameworks": [ - "net9.0" - ], - "sources": { - "https://api.nuget.org/v3/index.json": {} - }, - "frameworks": { - "net9.0": { - "framework": "net9.0", - "targetAlias": "net9.0", - "projectReferences": {} - } - }, - "warningProperties": { - "warnAsError": [ - "NU1605" - ] - }, - "restoreAuditProperties": { - "enableAudit": "true", - "auditLevel": "low", - "auditMode": "direct" - }, - "SdkAnalysisLevel": "10.0.400" - }, - "frameworks": { - "net9.0": { - "framework": "net9.0", - "targetAlias": "net9.0", - "imports": [ - "net461", - "net462", - "net47", - "net471", - "net472", - "net48", - "net481" - ], - "assetTargetFallback": true, - "warn": true, - "downloadDependencies": [ - { - "name": "Microsoft.AspNetCore.App.Ref", - "version": "[9.0.19, 9.0.19]" - }, - { - "name": "Microsoft.NETCore.App.Host.win-x64", - "version": "[9.0.19, 9.0.19]" - }, - { - "name": "Microsoft.NETCore.App.Ref", - "version": "[9.0.19, 9.0.19]" - }, - { - "name": "Microsoft.WindowsDesktop.App.Ref", - "version": "[9.0.19, 9.0.19]" - } - ], - "frameworkReferences": { - "Microsoft.NETCore.App": { - "privateAssets": "all" - } - }, - "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\10.0.400/PortableRuntimeIdentifierGraph.json" - } - } - } - } -} \ No newline at end of file diff --git a/Charp/lab-03/lab-03/obj/lab-03.csproj.nuget.g.props b/Charp/lab-03/lab-03/obj/lab-03.csproj.nuget.g.props deleted file mode 100644 index 17e96a2..0000000 --- a/Charp/lab-03/lab-03/obj/lab-03.csproj.nuget.g.props +++ /dev/null @@ -1,15 +0,0 @@ - - - - True - NuGet - $(MSBuildThisFileDirectory)project.assets.json - $(UserProfile)\.nuget\packages\ - C:\Users\228p\.nuget\packages\ - PackageReference - 7.0.0 - - - - - \ No newline at end of file diff --git a/Charp/lab-03/lab-03/obj/lab-03.csproj.nuget.g.targets b/Charp/lab-03/lab-03/obj/lab-03.csproj.nuget.g.targets deleted file mode 100644 index 3dc06ef..0000000 --- a/Charp/lab-03/lab-03/obj/lab-03.csproj.nuget.g.targets +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/Charp/lab-03/lab-03/obj/project.assets.json b/Charp/lab-03/lab-03/obj/project.assets.json deleted file mode 100644 index 346d4b9..0000000 --- a/Charp/lab-03/lab-03/obj/project.assets.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "version": 4, - "targets": { - "net9.0": {} - }, - "libraries": {}, - "projectFileDependencyGroups": { - "net9.0": [] - }, - "packageFolders": { - "C:\\Users\\228p\\.nuget\\packages\\": {} - }, - "project": { - "version": "1.0.0", - "restore": { - "projectUniqueName": "Z:\\prog-radzh\\works\\Csharp\\lab-03\\lab-03\\lab-03.csproj", - "projectName": "lab-03", - "projectPath": "Z:\\prog-radzh\\works\\Csharp\\lab-03\\lab-03\\lab-03.csproj", - "packagesPath": "C:\\Users\\228p\\.nuget\\packages\\", - "outputPath": "Z:\\prog-radzh\\works\\Csharp\\lab-03\\lab-03\\obj\\", - "projectStyle": "PackageReference", - "configFilePaths": [ - "C:\\Users\\228p\\AppData\\Roaming\\NuGet\\NuGet.Config" - ], - "originalTargetFrameworks": [ - "net9.0" - ], - "sources": { - "https://api.nuget.org/v3/index.json": {} - }, - "frameworks": { - "net9.0": { - "framework": "net9.0", - "targetAlias": "net9.0", - "projectReferences": {} - } - }, - "warningProperties": { - "warnAsError": [ - "NU1605" - ] - }, - "restoreAuditProperties": { - "enableAudit": "true", - "auditLevel": "low", - "auditMode": "direct" - }, - "SdkAnalysisLevel": "10.0.400" - }, - "frameworks": { - "net9.0": { - "framework": "net9.0", - "targetAlias": "net9.0", - "imports": [ - "net461", - "net462", - "net47", - "net471", - "net472", - "net48", - "net481" - ], - "assetTargetFallback": true, - "warn": true, - "downloadDependencies": [ - { - "name": "Microsoft.AspNetCore.App.Ref", - "version": "[9.0.19, 9.0.19]" - }, - { - "name": "Microsoft.NETCore.App.Host.win-x64", - "version": "[9.0.19, 9.0.19]" - }, - { - "name": "Microsoft.NETCore.App.Ref", - "version": "[9.0.19, 9.0.19]" - }, - { - "name": "Microsoft.WindowsDesktop.App.Ref", - "version": "[9.0.19, 9.0.19]" - } - ], - "frameworkReferences": { - "Microsoft.NETCore.App": { - "privateAssets": "all" - } - }, - "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\10.0.400/PortableRuntimeIdentifierGraph.json" - } - } - } -} \ No newline at end of file diff --git a/Charp/lab-03/lab-03/obj/project.nuget.cache b/Charp/lab-03/lab-03/obj/project.nuget.cache deleted file mode 100644 index 95283b0..0000000 --- a/Charp/lab-03/lab-03/obj/project.nuget.cache +++ /dev/null @@ -1,13 +0,0 @@ -{ - "version": 2, - "dgSpecHash": "AbblvEY9Z5o=", - "success": true, - "projectFilePath": "Z:\\prog-radzh\\works\\Csharp\\lab-03\\lab-03\\lab-03.csproj", - "expectedPackageFiles": [ - "C:\\Users\\228p\\.nuget\\packages\\microsoft.netcore.app.ref\\9.0.19\\microsoft.netcore.app.ref.9.0.19.nupkg.sha512", - "C:\\Users\\228p\\.nuget\\packages\\microsoft.windowsdesktop.app.ref\\9.0.19\\microsoft.windowsdesktop.app.ref.9.0.19.nupkg.sha512", - "C:\\Users\\228p\\.nuget\\packages\\microsoft.aspnetcore.app.ref\\9.0.19\\microsoft.aspnetcore.app.ref.9.0.19.nupkg.sha512", - "C:\\Users\\228p\\.nuget\\packages\\microsoft.netcore.app.host.win-x64\\9.0.19\\microsoft.netcore.app.host.win-x64.9.0.19.nupkg.sha512" - ], - "logs": [] -} \ No newline at end of file diff --git a/Charp/lab-03/lab-03/obj/project.packagespec.json b/Charp/lab-03/lab-03/obj/project.packagespec.json deleted file mode 100644 index ff533d0..0000000 --- a/Charp/lab-03/lab-03/obj/project.packagespec.json +++ /dev/null @@ -1 +0,0 @@ -"restore":{"projectUniqueName":"Z:\\prog-radzh\\works\\Csharp\\lab-03\\lab-03\\lab-03.csproj","projectName":"lab-03","projectPath":"Z:\\prog-radzh\\works\\Csharp\\lab-03\\lab-03\\lab-03.csproj","packagesPath":"","outputPath":"Z:\\prog-radzh\\works\\Csharp\\lab-03\\lab-03\\obj\\","projectStyle":"PackageReference","originalTargetFrameworks":["net9.0"],"sources":{"https://api.nuget.org/v3/index.json":{}},"frameworks":{"net9.0":{"framework":"net9.0","targetAlias":"net9.0","projectReferences":{}}},"warningProperties":{"warnAsError":["NU1605"]},"restoreAuditProperties":{"enableAudit":"true","auditLevel":"low","auditMode":"direct"},"SdkAnalysisLevel":"10.0.400"}"frameworks":{"net9.0":{"framework":"net9.0","targetAlias":"net9.0","imports":["net461","net462","net47","net471","net472","net48","net481"],"assetTargetFallback":true,"warn":true,"downloadDependencies":[{"name":"Microsoft.AspNetCore.App.Ref","version":"[9.0.19, 9.0.19]"},{"name":"Microsoft.NETCore.App.Host.win-x64","version":"[9.0.19, 9.0.19]"},{"name":"Microsoft.NETCore.App.Ref","version":"[9.0.19, 9.0.19]"},{"name":"Microsoft.WindowsDesktop.App.Ref","version":"[9.0.19, 9.0.19]"}],"frameworkReferences":{"Microsoft.NETCore.App":{"privateAssets":"all"}},"runtimeIdentifierGraphPath":"C:\\Program Files\\dotnet\\sdk\\10.0.400/PortableRuntimeIdentifierGraph.json"}} \ No newline at end of file diff --git a/Charp/lab-03/lab-03/obj/rider.project.restore.info b/Charp/lab-03/lab-03/obj/rider.project.restore.info deleted file mode 100644 index a068bc3..0000000 --- a/Charp/lab-03/lab-03/obj/rider.project.restore.info +++ /dev/null @@ -1 +0,0 @@ -17889352130712831 \ No newline at end of file diff --git a/Kotlin/lab-03/main.kt b/Kotlin/lab-03/main.kt new file mode 100644 index 0000000..f7b881b --- /dev/null +++ b/Kotlin/lab-03/main.kt @@ -0,0 +1,90 @@ +fun main() { + // ЧАСТЬ 1. Проверка условий через if-else + println("=== ПРОВЕРКА СОСТОЯНИЯ ПОКЕМОНА ===") + + print("Введите текущее HP: ") + val currentHpInput = readln().toIntOrNull() ?: 0 + + print("Введите количество энергии: ") + val energyAttachedInput = readln().toIntOrNull() ?: 0 + + println() + + // 1.1 Классический if-else + if (currentHpInput <= 0) { + println("Покемон в нокауте.") + } else { + println("Покемон в строю и готов к бою.") + } + + // 1.2 if-else как выражение + val attackStatus = if (energyAttachedInput >= 3) { + "Доступна атака 'Giga Impact'" + } else { + "Недостаточно ресурсов: требуется минимум 3 карты энергии" + } + println("Статус атаки: $attackStatus") + + + // ЧАСТЬ 2. Обработка типов и состояний через when + println("\n=== РОЗЫГРЫШ КАРТЫ ТРЕНЕРА ===") + + print("Введите название карты Тренера: ") + val trainerCardInput = readln() + + // 2.1 Классический when + print("Эффект: ") + when (trainerCardInput) { + "Potion" -> println("Лечение +30 HP.") + "Professor's Research" -> println("Добор 7 карт из колоды.") + "Switch" -> println("Замена активного Покемона.") + else -> println("Неизвестная карта Тренера.") + } + + + println("\n=== РАСЧЕТ СТИХИЙНОГО МНОЖИТЕЛЯ ===") + + print("Введите стихию Покемона (Fire, Water, Grass): ") + val elementInput = readln() + + // 2.2 when как выражение с многострочными блоками { } + val weaknessMultiplier: Double = when (elementInput) { + "Water" -> { + println("[Слабость к Электричеству]") + 2.0 + } + "Fire" -> { + println("[Слабость к Воде]") + 1.5 + } + "Grass" -> { + println("[Слабость к Огню]") + 1.2 + } + else -> { + println("[Базовый коэффициент]") + 1.0 + } + } + + + println() + print("Введите текущий % HP (0-100): ") + val hpPercent = readln().toIntOrNull() ?: 0 + + // 3.1 Безаргументный when + val healthState: String = when { + hpPercent == 0 -> "Нокаут" + hpPercent in 1..20 -> "Критическое состояние" + hpPercent in 21..70 -> "Поврежден" + else -> "Отличное состояние" + } + + + + println("\n========================================") + println("ИТОГОВЫЙ СТАТУС БОЯ:") + println("Множитель урона: x$weaknessMultiplier") + println("Категория здоровья: $healthState") + println("========================================") +} \ No newline at end of file diff --git a/Kotlin/readme.md b/Kotlin/readme.md index c66b5a0..be0f551 100644 --- a/Kotlin/readme.md +++ b/Kotlin/readme.md @@ -21,5 +21,6 @@ | :-: | :--- | :-: | :-: | | **01** | **Тема:** Введение в язык Kotlin. Переменные, базовые типы данных и консольный ввод/вывод информации | [lab-01](./lab-01) | `Завершено` | | **02** | **Тема:** Приведение типов данных (casting) и математические операции в языке Kotlin | [lab-02](./lab-02) | `Завершено` | +| **03** | **Тема:**Управляющие конструкции if-else, when | [lab-03](./lab-03) | `Завершено` | --- \ No newline at end of file