From ba45d722cd84d937fc797678c25288433fe7793f Mon Sep 17 00:00:00 2001 From: Fuflick Date: Sat, 25 Nov 2023 21:18:17 +0300 Subject: [PATCH] make Dog's age property uint --- CourseApp/DogClass/Dog.cs | 4 ++-- CourseApp/Program.cs | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CourseApp/DogClass/Dog.cs b/CourseApp/DogClass/Dog.cs index 3c3f785..35ea345 100644 --- a/CourseApp/DogClass/Dog.cs +++ b/CourseApp/DogClass/Dog.cs @@ -5,7 +5,7 @@ namespace DefaultNamespace; public class Dog { - private int _age; + private uint _age; private string _name; @@ -18,7 +18,7 @@ public string Name set => _name = value; } - public int Age + public uint Age { get => _age; diff --git a/CourseApp/Program.cs b/CourseApp/Program.cs index 9b8ebde..0369358 100644 --- a/CourseApp/Program.cs +++ b/CourseApp/Program.cs @@ -3,12 +3,13 @@ using System; using System.Collections.Generic; using RpgSaga; +using DefaultNamespace; public class Program { public static void Main(string[] args) { - var rnd = new Random(); + /*var rnd = new Random(); var list = new List() { new Archer(), @@ -20,6 +21,6 @@ public static void Main(string[] args) while (true) { visor.Fight(list[rnd.Next(0, 2)], list[rnd.Next(0, 2)]); - } + }*/ } }