private HashSet<Coordinate> getUsedCoordinates() {
HashSet<Coordinate> isUsed = new HashSet<Coordinate>();
for (int x : statesPerType.get(StateType.SUBNODE)) {
for (int y : statesPerType.get(StateType.SHARED)) {
isUsed.add(new Coordinate(x, y));
isUsed.add(new Coordinate(y, x));
}
for (int y : statesPerType.get(StateType.SUBNODE)) {
isUsed.add(new Coordinate(x, y));
}
}
for (int x : statesPerType.get(StateType.SUPERNODE)) {
for (int y : statesPerType.get(StateType.SHARED)) {
isUsed.add(new Coordinate(x, y));
isUsed.add(new Coordinate(y, x));
}
for (int y : statesPerType.get(StateType.SUPERNODE)) {
isUsed.add(new Coordinate(x, y));
}
}
return isUsed;
}