-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAnimal.cs
36 lines (28 loc) · 871 Bytes
/
Animal.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
using System;
namespace Bot_Farm {
public class Animal {
public string name;
public AnimalRace race;
public FacilityType housing;
public Facility home;
public double health;
public double resistance;
public Size size;
public Animal(string name) {
race = AnimalRace.Creature;
this.name = name;
home = null;
resistance = (int)size;
}
public Animal() : this("Animal") { }
public void GetInfo() {
string homeInfo = home == null ? "none" : home.ToString();
//TODO race.Lower()
Console.WriteLine("" +
"\nThis is a {0} named {1}" +
"\nHealth: {2}" +
"\nHome: {3}",
race.ToString().ToLower(), name, health, homeInfo);
}
}
}