-
Notifications
You must be signed in to change notification settings - Fork 0
/
Wire.java
46 lines (36 loc) · 894 Bytes
/
Wire.java
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
package net.l8fish.circuits;
public class Wire implements Component {
private boolean status;
public static int numberOfWires = 0;
private int id;
private Element input;
private Element output;
public Wire() {
status = false;
id = ++numberOfWires;
}
public int getId() {
return id;
}
public boolean isConnected() {
return input != null && output != null;
}
public void setStatus(boolean status) {
this.status = status;
}
public boolean getStatus() {
return status;
}
public void setInput(Element input) {
this.input = input;
}
public Element getInput() {
return input;
}
public void setOutput(Element output) {
this.output = output;
}
public Element getOutput() {
return output;
}
}