This commit is contained in:
Anuken
2021-01-29 09:32:29 -05:00
parent 7cdf7a21fe
commit d512aa5b21
2 changed files with 11 additions and 1 deletions

View File

@@ -292,6 +292,16 @@ public class PowerGraph{
}
}
/** Used for unit tests only. */
public void removeList(Building build){
all.remove(build);
producers.remove(build);
consumers.remove(build);
batteries.remove(build);
}
/** Note that this does not actually remove the building from the graph;
* it creates *new* graphs that contain the correct buildings. */
public void remove(Building tile){
//go through all the connections of this tile