Skip to content

Commit

Permalink
Removed reactor body from materials list.
Browse files Browse the repository at this point in the history
  • Loading branch information
MauveCloud committed Oct 2, 2014
1 parent 01600d9 commit 02d33e2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
1 change: 1 addition & 0 deletions nbproject/private/private.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
<group>
<file>file:/E:/GitHub/Ic2ExpReactorPlanner/src/Ic2ExpReactorPlanner/ReactorPlannerFrame.java</file>
<file>file:/E:/GitHub/Ic2ExpReactorPlanner/src/Ic2ExpReactorPlanner/Reactor.java</file>
<file>file:/E:/GitHub/Ic2ExpReactorPlanner/src/Ic2ExpReactorPlanner/Simulator.java</file>
</group>
</open-files>
Expand Down
10 changes: 3 additions & 7 deletions src/Ic2ExpReactorPlanner/Reactor.java
Original file line number Diff line number Diff line change
Expand Up @@ -115,22 +115,18 @@ public void clearEUOutput() {
}

/**
* Gets a list of the materials needed to build the reactor and components.
* @return a list of the materials needed to build the reactor and components.
* Gets a list of the materials needed to build the components.
* @return a list of the materials needed to build the components.
*/
public MaterialsList getMaterials() {
MaterialsList result = new MaterialsList(REACTOR);
int lastColumnFilled = 0;
MaterialsList result = new MaterialsList();
for (int col = 0; col < grid[0].length; col++) {
for (int row = 0; row < grid.length; row++) {
if (grid[row][col] != null) {
lastColumnFilled = Math.max(lastColumnFilled, col);
result.add(grid[row][col].getMaterials());
}
}
}
int chambersNeeded = Math.max(0, lastColumnFilled - 2);
result.add(chambersNeeded, REACTOR_CHAMBER);
return result;
}

Expand Down

0 comments on commit 02d33e2

Please sign in to comment.