-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathZone.cs
62 lines (55 loc) · 1.43 KB
/
Zone.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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace HazeronProspector
{
public class Zone
{
protected CelestialBody _hostCelestialBody;
public CelestialBody HostCelestialBody
{
get { return _hostCelestialBody; }
set { _hostCelestialBody = value; }
}
protected Dictionary<ResourceType, Resource> _resources = new Dictionary<ResourceType, Resource>();
public Dictionary<ResourceType, Resource> Resources
{
get { return _resources; }
}
protected int _id;
public int ID
{
get { return _id; }
}
public string Name
{
get { return "z" + (_id + 1); }
}
public Zone()
{
_id = 0;
}
public Zone(int id)
{
_id = id;
}
public void AddResource(Resource resource)
{
_resources.Add(resource.Type, resource);
resource.HostZone = this;
}
//protected List<HCity> _cities = new List<HCities>();
//public List<HCity> Cities
//{
// get { return _cities; }
//}
public override string ToString()
{
if (_hostCelestialBody.ResourceZones.Length > 1)
return (_id + 1).ToString();
else
return "";
}
}
}