aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/api/graphs/NodeList.java
diff options
context:
space:
mode:
authorKiwi <42833050+Kiwi233@users.noreply.github.com>2021-07-05 22:06:44 +0800
committerGitHub <noreply@github.com>2021-07-05 22:06:44 +0800
commit4eaefbb5455dc3402b43dcbf6cba208cea4e301a (patch)
treeb7e34b2e20af663cdd72c616fd7424301304e3e4 /src/main/java/gregtech/api/graphs/NodeList.java
parent36406947fc5c0de1ee71da2644ec057b5fbc8d25 (diff)
parent703a8930bee25b1f908e9c4ea4f52cef24337d03 (diff)
downloadGT5-Unofficial-4eaefbb5455dc3402b43dcbf6cba208cea4e301a.tar.gz
GT5-Unofficial-4eaefbb5455dc3402b43dcbf6cba208cea4e301a.tar.bz2
GT5-Unofficial-4eaefbb5455dc3402b43dcbf6cba208cea4e301a.zip
Merge pull request #3 from GTNewHorizons/experimental
gregtech-5.09.35.00
Diffstat (limited to 'src/main/java/gregtech/api/graphs/NodeList.java')
-rw-r--r--src/main/java/gregtech/api/graphs/NodeList.java24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/main/java/gregtech/api/graphs/NodeList.java b/src/main/java/gregtech/api/graphs/NodeList.java
new file mode 100644
index 0000000000..36ebbc4f6f
--- /dev/null
+++ b/src/main/java/gregtech/api/graphs/NodeList.java
@@ -0,0 +1,24 @@
+package gregtech.api.graphs;
+
+//keep track on which node is being looked for across the recursive functions
+public class NodeList {
+ Node[] mNodes;
+ int mCounter = 0;
+ public NodeList(Node[] mNodes) {
+ this.mNodes = mNodes;
+ }
+
+ Node getNextNode() {
+ if (++mCounter < mNodes.length)
+ return mNodes[mCounter];
+ else
+ return null;
+ }
+
+ Node getNode() {
+ if (mCounter < mNodes.length)
+ return mNodes[mCounter];
+ else
+ return null;
+ }
+}