mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
- Temporarily reverting the Java 8 stream commit (does not compile for Android, pending investigation).
This commit is contained in:
@@ -44,7 +44,6 @@ import java.util.Map;
|
|||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
|
|
||||||
import com.google.common.base.Function;
|
import com.google.common.base.Function;
|
||||||
import com.google.common.collect.Lists;
|
|
||||||
|
|
||||||
public final class ConquestData {
|
public final class ConquestData {
|
||||||
private static final String XML_FILE = "data.xml";
|
private static final String XML_FILE = "data.xml";
|
||||||
@@ -199,9 +198,14 @@ public final class ConquestData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public int getAccessiblePlaneCount() {
|
public int getAccessiblePlaneCount() {
|
||||||
return Lists.newArrayList(FModel.getPlanes()).stream()
|
// TODO: Java 8 stream implementation of filtering
|
||||||
.filter((ConquestPlane c) -> { return !c.isUnreachable(); } )
|
int i = 0;
|
||||||
.toArray().length;
|
for (ConquestPlane plane : FModel.getPlanes()) {
|
||||||
|
if (!plane.isUnreachable()) {
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void unlockPlane(ConquestPlane plane) {
|
public void unlockPlane(ConquestPlane plane) {
|
||||||
|
|||||||
Reference in New Issue
Block a user