Skip to content

Commit

Permalink
Begin work on the Util class for #162 that will allow access to the g…
Browse files Browse the repository at this point in the history
…enerators in the area.
  • Loading branch information
hunterboerner committed Dec 24, 2013
1 parent 7d2af89 commit 554f6ee
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions src/main/java/quantumcraft/util/QIGUtil.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package quantumcraft.util;

import quantumcraft.net.Location;

import java.util.ArrayList;

public class QIGUtil {
private static ArrayList<Location> generators = new ArrayList<Location>();

public static ArrayList<Location> getGenerators() {
return generators;
}

public static void setGenerators(ArrayList<Location> generators) {
QIGUtil.generators = generators;
}

public static boolean addGenerator(Location location) {
return generators.add(location);
}

public static Location removeGenerator(int index) {
return generators.remove(index);
}

public static void clearGenerators() {
generators.clear();
}
}

0 comments on commit 554f6ee

Please sign in to comment.