Add Niv-Mizzet Reborn

This commit is contained in:
swordshine
2019-05-04 19:43:01 +08:00
parent 312dfc0205
commit e4fad75edd
5 changed files with 40 additions and 0 deletions

View File

@@ -112,6 +112,11 @@ public final class ColorSet implements Comparable<ColorSet>, Iterable<Byte>, Ser
return (this.myColor & colormask) == colormask;
}
/** this has exactly the colors defined by operand. */
public boolean hasExactlyColor(final int colormask) {
return this.myColor == colormask;
}
/** this has no other colors except defined by operand. */
public boolean hasNoColorsExcept(final ColorSet other) {
return hasNoColorsExcept(other.getColor());

View File

@@ -25,6 +25,8 @@ public final class MagicColor {
public static final byte[] WUBRG = new byte[] { WHITE, BLUE, BLACK, RED, GREEN };
public static final byte[] WUBRGC = new byte[] { WHITE, BLUE, BLACK, RED, GREEN, COLORLESS };
public static final byte[] COLORPAIR = new byte[] { WHITE | BLUE, BLUE | BLACK, BLACK | RED, RED | GREEN, GREEN |WHITE,
WHITE | BLUE, BLUE | RED, BLACK | GREEN, RED | WHITE, GREEN | BLUE};
/**
* Private constructor to prevent instantiation.