mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
shifted MagicColors 1 bit to the right
This commit is contained in:
@@ -62,7 +62,7 @@ public final class ColorSet implements Comparable<ColorSet>, Iterable<Byte> {
|
||||
}
|
||||
|
||||
public static ColorSet fromMask(final int mask) {
|
||||
int mask32 = (mask & MagicColor.ALL_COLORS) >> 1;
|
||||
int mask32 = mask & MagicColor.ALL_COLORS;
|
||||
if (allColors[mask32] == null) {
|
||||
allColors[mask32] = new ColorSet((byte) mask);
|
||||
}
|
||||
|
||||
@@ -11,11 +11,11 @@ import com.google.common.collect.ImmutableList;
|
||||
public class MagicColor {
|
||||
|
||||
public static final byte COLORLESS = 0;
|
||||
public static final byte WHITE = 1 << 1;
|
||||
public static final byte BLUE = 1 << 2;
|
||||
public static final byte BLACK = 1 << 3;
|
||||
public static final byte RED = 1 << 4;
|
||||
public static final byte GREEN = 1 << 5;
|
||||
public static final byte WHITE = 1 << 0;
|
||||
public static final byte BLUE = 1 << 1;
|
||||
public static final byte BLACK = 1 << 2;
|
||||
public static final byte RED = 1 << 3;
|
||||
public static final byte GREEN = 1 << 4;
|
||||
|
||||
public static final byte ALL_COLORS = BLACK | BLUE | WHITE | RED | GREEN;
|
||||
public static final int NUMBER_OR_COLORS = 5;
|
||||
|
||||
Reference in New Issue
Block a user