Methapolis  0.27
 All Classes Namespaces Files Functions Variables Enumerator
Zone.java
Go to the documentation of this file.
1 package refactored;
2 
3 import java.util.List;
4 
8 public class Zone {
9  public static final short RESIDENTIAL = 1;
10  public static final short INDUSTRIAL = 2;
11  public static final short COMMERCIAL = 3;
12  public static final short POLICE = 4;
13  public static final short FIRESTATION = 5;
14  // TODO: to be continued...
15 
16 
17  // ATTRIBUTES
18  private short type;
19  private short width;
20  private short height;
21  private short x;
22  private short y;
23  private List<Building> buildings;
24 
25  // CONSTRUCTORS
26  public Zone(short type, short x, short y) {
27  this(type, x, y, (short) 3, (short) 3);
28  }
29 
30  public Zone(short type, short x, short y, short width, short height) {
31  this.type = type;
32  this.x = x;
33  this.y = y;
34  this.width = width;
35  this.height = height;
36  }
37 
38  // GETTERS & SETTERS
39  public short getType() {
40  return type;
41  }
42 
43  public void setType(short type) {
44  this.type = type;
45  }
46 
47  public short getWidth() {
48  return width;
49  }
50 
51  public void setWidth(short width) {
52  this.width = width;
53  }
54 
55  public short getHeight() {
56  return height;
57  }
58 
59  public void setHeight(short height) {
60  this.height = height;
61  }
62 
63  public short getX() {
64  return x;
65  }
66 
67  public void setX(short x) {
68  this.x = x;
69  }
70 
71  public short getY() {
72  return y;
73  }
74 
75  public void setY(short y) {
76  this.y = y;
77  }
78 
79  public List<Building> getBuildings() {
80  return buildings;
81  }
82 
83  public void setBuildings(List<Building> buildings) {
84  this.buildings = buildings;
85  }
86 
87 }