Пример #1
0
 public Pet(string name, PetsEnum type)
 {
     Name        = name ?? throw new ArgumentNullException(nameof(name));
     PetType     = type;
     MaxAge      = new Random(DateTime.Today.Millisecond).Next(10, 21);
     _isAlive    = true;
     _currentAge = 0;
     SetPetStats();
 }
Пример #2
0
 public GameWindowViewModel(string name, PetsEnum petType) : this(new Pet(name, petType))
 {
 }