mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
Refactoring of CreatureType select sorting
This commit is contained in:
@@ -651,15 +651,13 @@ public class ComputerUtilCard {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for(String k: c.getCurrentState().getIntrinsicKeywords()){
|
if(c.hasStartOfKeyword(Keyword.FABRICATE.toString())){
|
||||||
if(k.split(":")[0].equals(Keyword.FABRICATE.toString())){
|
|
||||||
if (!map.containsKey("Servo")) {
|
if (!map.containsKey("Servo")) {
|
||||||
map.put("Servo", 1);
|
map.put("Servo", 1);
|
||||||
} else {
|
} else {
|
||||||
map.put("Servo", map.get("Servo") + 1);
|
map.put("Servo", map.get("Servo") + 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
} // for
|
} // for
|
||||||
|
|
||||||
int max = 0;
|
int max = 0;
|
||||||
|
|||||||
@@ -867,8 +867,7 @@ public class PlayerControllerHuman
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for(String k: c.getCurrentState().getIntrinsicKeywords()){
|
if(c.hasStartOfKeyword(Keyword.FABRICATE.toString())){
|
||||||
if(k.split(":")[0].equals(Keyword.FABRICATE.toString())){
|
|
||||||
if (!typesInDeck.containsKey("Servo")) {
|
if (!typesInDeck.containsKey("Servo")) {
|
||||||
typesInDeck.put("Servo", 1);
|
typesInDeck.put("Servo", 1);
|
||||||
} else {
|
} else {
|
||||||
@@ -876,7 +875,6 @@ public class PlayerControllerHuman
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
//create sorted list from map from least to most frequent
|
//create sorted list from map from least to most frequent
|
||||||
List<Entry<String, Integer>> sortedList = new LinkedList<Entry<String, Integer>>(typesInDeck.entrySet());
|
List<Entry<String, Integer>> sortedList = new LinkedList<Entry<String, Integer>>(typesInDeck.entrySet());
|
||||||
|
|||||||
Reference in New Issue
Block a user