-
Notifications
You must be signed in to change notification settings - Fork 0
/
demomodelisation_2.cs
76 lines (67 loc) · 2.62 KB
/
demomodelisation_2.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
public class foo
{
public void bar()
{
SpecieInfo specie = new SpecieInfo
{
Id = 1,
Name = "Lapin Angora",
Info = "Le lapin angora est un rongeur de fils",
AverageLongevity = 3,
MaxLongevity = 5,
AverageAdultWeight = 2,
MaxAdultWeight = 4,
MinHabitatSize = 2,
RecommendedHabitatSize = 20,
InitialMaterialCost = 70,
AnnualMaterialCost = 15,
MonthlyElectricityCost = 0.5m,
MonthlyFoodCost = 5,
DailyAttentionSpanInMinutes = 10,
};
SpecieInfoConfig config = new SpecieInfoConfig
{
SpecieConfig = specie,
RecommendedHabitatSize = new Unit { Name = "m², m³, litters ?"}
};
}
}
public class SpecieInfoConfig // if no config > default values
{
public SpecieInfo SpecieConfig { get; set; }
public Unit RecommendedHabitatSize { get; set; }
public Unit AverageLongevity { get; set; }
public Unit MaxLongevity { get; set; }
public Unit AverageAdultWeight { get; set; }
public Unit MaxAdultWeight { get; set; }
public Unit MinHabitatSize { get; set; }
public Unit RecommendedHabitatSize { get; set; }
public Unit InitialMaterialCost { get; set; }
public Unit AnnualMaterialCost { get; set; }
public Unit MonthlyElectricityCost { get; set; }
public Unit MonthlyFoodCost { get; set; }
public Unit DailyAttentionSpanInMinutes { get; set; }
}
public class SpecieInfo
{
public int Id { get; set; }
public string Name { get; set; }
public string Info { get; set; }
public decimal AverageLongevity { get; set; }
public decimal MaxLongevity { get; set; }
public decimal AverageAdultSize { get; set; }
public decimal MaxAdultSize { get; set; }
public decimal AverageAdultWeight { get; set; }
public decimal MaxAdultWeight { get; set; }
public decimal MinHabitatSize { get; set; }
public decimal RecommendedHabitatSize { get; set; }
public decimal InitialMaterialCost { get; set; }
public decimal AnnualMaterialCost { get; set; }
public decimal MonthlyElectricityCost { get; set; }
public decimal MonthlyFoodCost { get; set; }
public decimal DailyAttentionSpanInMinutes { get; set; }
}
public class Unit
{
public string Name { get; set; }
}