private boolean equal(Gate g, GateTypes current) {
		if (g.isXOR() && current == GateTypes.XOR) {
			return true;
		} else if (g.isAND() && current == GateTypes.AND) {
			return true;
		} else if (g.isINV() && current == GateTypes.INV) {
			return true;
		} else return false;
	}