This commit is contained in:
Anuken 2021-01-28 10:23:02 -05:00
parent d0572a2a0d
commit 5a258d2830

View file

@ -291,15 +291,8 @@ public class PowerGraph{
}
}
private void removeSingle(Building tile){
all.remove(tile, true);
producers.remove(tile, true);
consumers.remove(tile, true);
batteries.remove(tile, true);
}
public void remove(Building tile){
removeSingle(tile);
//begin by clearing the closed set
closedSet.clear();
@ -317,8 +310,6 @@ public class PowerGraph{
while(queue.size > 0){
//get child from queue
Building child = queue.removeFirst();
//remove it from this graph
removeSingle(child);
//add it to the new branch graph
graph.add(child);
//go through connections