Refactoring of CreatureType select sorting

This commit is contained in:
austinio7116
2017-05-27 06:41:54 +00:00
parent 687e26e23a
commit f30a1d5950
2 changed files with 10 additions and 14 deletions

View File

@@ -651,15 +651,13 @@ public class ComputerUtilCard {
}
}
}
for(String k: c.getCurrentState().getIntrinsicKeywords()){
if(k.split(":")[0].equals(Keyword.FABRICATE.toString())){
if(c.hasStartOfKeyword(Keyword.FABRICATE.toString())){
if (!map.containsKey("Servo")) {
map.put("Servo", 1);
} else {
map.put("Servo", map.get("Servo") + 1);
}
}
}
} // for
int max = 0;

View File

@@ -867,8 +867,7 @@ public class PlayerControllerHuman
}
}
}
for(String k: c.getCurrentState().getIntrinsicKeywords()){
if(k.split(":")[0].equals(Keyword.FABRICATE.toString())){
if(c.hasStartOfKeyword(Keyword.FABRICATE.toString())){
if (!typesInDeck.containsKey("Servo")) {
typesInDeck.put("Servo", 1);
} else {
@@ -876,7 +875,6 @@ public class PlayerControllerHuman
}
}
}
}
//create sorted list from map from least to most frequent
List<Entry<String, Integer>> sortedList = new LinkedList<Entry<String, Integer>>(typesInDeck.entrySet());