cicaprojekt/cicaprojekt/Stargate.java
2016-04-24 23:01:34 +02:00

39 lines
1.0 KiB
Java

package cicaprojekt;
public class Stargate {
public static final Stargate yellowStargate = new Stargate();
public static final Stargate blueStargate = new Stargate();
public static final Stargate redStargate = new Stargate();
public static final Stargate greenStargate = new Stargate();
public /*final*/ Stargate other; //TODO find better ways to do this
private boolean isSpawned;
private Wall currentWall;
private Stargate() {
isSpawned = false;
}
public static void init() {
yellowStargate.other = blueStargate;
blueStargate.other = yellowStargate;
redStargate.other = greenStargate;
greenStargate.other = redStargate;
}
public Wall getCurrentWall() {
return currentWall;
}
public void setCurrentWall(Wall wall) {
currentWall = wall;
}
public boolean isOpen() {
return isSpawned;
}
public void teleport(Direction incomingDirection) {
}
}