예제 #1
0
파일: Pet.cs 프로젝트: meCtd/SimpleProject
 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))
 {
 }