mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
- Fixed getShortColor being case sensitive.
This commit is contained in:
@@ -51,10 +51,11 @@ public final class CardUtil {
|
|||||||
|
|
||||||
// returns "G", longColor is Constant.Color.Green and the like
|
// returns "G", longColor is Constant.Color.Green and the like
|
||||||
public static String getShortColor(final String longColor) {
|
public static String getShortColor(final String longColor) {
|
||||||
if (!colorMap.containsKey(longColor)) {
|
String color = longColor.toLowerCase();
|
||||||
|
if (!colorMap.containsKey(color)) {
|
||||||
throw new RuntimeException("CardUtil : getShortColor() invalid argument - " + longColor);
|
throw new RuntimeException("CardUtil : getShortColor() invalid argument - " + longColor);
|
||||||
}
|
}
|
||||||
return colorMap.get(longColor);
|
return colorMap.get(color);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static List<String> getColors(final Card c) {
|
public static List<String> getColors(final Card c) {
|
||||||
|
|||||||
Reference in New Issue
Block a user