Refactor Planar Conquest code so planes and regions can be loaded from resource files

This commit is contained in:
drdev
2016-01-31 00:16:20 +00:00
parent deb88ce8ab
commit 16f0898842
22 changed files with 501 additions and 666 deletions

View File

@@ -77,6 +77,14 @@ public final class ColorSet implements Comparable<ColorSet>, Iterable<Byte>, Ser
return fromMask(mask);
}
public static ColorSet fromNames(final char[] colors) {
byte mask = 0;
for (final char s : colors) {
mask |= MagicColor.fromName(s);
}
return fromMask(mask);
}
public static ColorSet fromManaCost(final ManaCost mana) {
return fromMask(mana.getColorProfile());
}