introduce bitloops
This commit is contained in:
@@ -160,7 +160,7 @@ public record Export() {
|
|||||||
|
|
||||||
record Placed(long lemma, int slotKey, int[] cells) {
|
record Placed(long lemma, int slotKey, int[] cells) {
|
||||||
|
|
||||||
static final char[] DIRECTION = { '\0', Placed.VERTICAL, Placed.HORIZONTAL, Placed.VERTICAL, Placed.HORIZONTAL, Placed.VERTICAL };
|
static final char[] DIRECTION = { Placed.VERTICAL, Placed.HORIZONTAL, Placed.VERTICAL, Placed.HORIZONTAL };
|
||||||
public static final char HORIZONTAL = 'h';
|
public static final char HORIZONTAL = 'h';
|
||||||
static final char VERTICAL = 'v';
|
static final char VERTICAL = 'v';
|
||||||
public int arrowCol() { return Grid.c(Slot.clueIndex(slotKey)); }
|
public int arrowCol() { return Grid.c(Slot.clueIndex(slotKey)); }
|
||||||
|
|||||||
@@ -68,8 +68,7 @@ public record SwedishGenerator(Rng rng) {
|
|||||||
|
|
||||||
static final byte B0 = (byte) 0;
|
static final byte B0 = (byte) 0;
|
||||||
static final byte B64 = (byte) 64;
|
static final byte B64 = (byte) 64;
|
||||||
static final long[] OFFSETS_D_IDX = Neighbors9x8.OFFSET_D_IDX;
|
static final long[] OFFSETS_D_IDX = Neighbors9x8.OFFSET_D_IDX_0_BASE;
|
||||||
static final long[] OFFSET_D_IDX_0_BASE = Neighbors9x8.OFFSET_D_IDX_0_BASE;
|
|
||||||
static final rci[] IT = Neighbors9x8.IT;
|
static final rci[] IT = Neighbors9x8.IT;
|
||||||
static final int[][] MUTATE_RI = new int[SIZE][625];
|
static final int[][] MUTATE_RI = new int[SIZE][625];
|
||||||
static final long[] NBR8_PACKED_LO = Neighbors9x8.NBR8_PACKED_LO;
|
static final long[] NBR8_PACKED_LO = Neighbors9x8.NBR8_PACKED_LO;
|
||||||
@@ -314,19 +313,18 @@ public record SwedishGenerator(Rng rng) {
|
|||||||
|
|
||||||
static record Slot(int key, long lo, long hi) {
|
static record Slot(int key, long lo, long hi) {
|
||||||
|
|
||||||
static final int BIT_FOR_DIR = 3;
|
static final int BIT_FOR_DIR = 2;
|
||||||
static Slot from(int key, long lo, long hi) { return new Slot(key, lo, hi); }
|
static Slot from(int key, long lo, long hi) { return new Slot(key, lo, hi); }
|
||||||
|
|
||||||
public int len() { return Long.bitCount(lo) + Long.bitCount(hi); }
|
public int len() { return Long.bitCount(lo) + Long.bitCount(hi); }
|
||||||
public int clueIndex() { return clueIndex(key); }
|
public int clueIndex() { return clueIndex(key); }
|
||||||
public static int clueIndex(int key) { return key >>> BIT_FOR_DIR; }
|
public static int clueIndex(int key) { return key >>> BIT_FOR_DIR; }
|
||||||
public static int dir(int key) { return key & 7; }
|
public static int dir(int key) { return key & 3; }
|
||||||
public boolean horiz() { return horiz(key); }
|
public boolean horiz() { return horiz(key); }
|
||||||
public boolean increasing() { return (key & 2) != 0; }
|
public boolean increasing() { return (key & 2) == 0; }
|
||||||
public static boolean increasing(int dir) { return (dir & 2) != 0; }
|
public static boolean increasing(int dir) { return (dir & 2) == 0; }
|
||||||
public IntStream walk() { return Gridded.walk((byte) key, lo, hi); }
|
public IntStream walk() { return Gridded.walk((byte) key, lo, hi); }
|
||||||
public static boolean horiz(int d) { return (d & 1) == 0; }
|
public static boolean horiz(int d) { return (d & 1) != 0; }
|
||||||
public static boolean horizv2(int d) { return (d & 1) == 1; }
|
|
||||||
public static int packSlotDir(int idx, int d) { return (idx << BIT_FOR_DIR) | d; }
|
public static int packSlotDir(int idx, int d) { return (idx << BIT_FOR_DIR) | d; }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -343,7 +341,7 @@ public record SwedishGenerator(Rng rng) {
|
|||||||
|
|
||||||
// slice ray to stop before first clue, depending on direction monotonicity
|
// slice ray to stop before first clue, depending on direction monotonicity
|
||||||
// right/down => increasing indices; up/left => decreasing indices
|
// right/down => increasing indices; up/left => decreasing indices
|
||||||
boolean increasing = Slot.increasing(d + 1);
|
boolean increasing = Slot.increasing(d);
|
||||||
|
|
||||||
if (increasing) {
|
if (increasing) {
|
||||||
// first clue is lowest index among hits (lo first, then hi)
|
// first clue is lowest index among hits (lo first, then hi)
|
||||||
@@ -371,7 +369,7 @@ public record SwedishGenerator(Rng rng) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ((rayLo | rayHi) != 0) {
|
if ((rayLo | rayHi) != 0) {
|
||||||
visitor.visit(Slot.packSlotDir(idx, d + 1), rayLo, rayHi);
|
visitor.visit(Slot.packSlotDir(idx, d), rayLo, rayHi);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -398,7 +396,7 @@ public record SwedishGenerator(Rng rng) {
|
|||||||
int key = (clueIdx << 2) | d;
|
int key = (clueIdx << 2) | d;
|
||||||
long rLo = PATH_LO[key], rHi = PATH_HI[key];
|
long rLo = PATH_LO[key], rHi = PATH_HI[key];
|
||||||
long hLo = rLo & lo_cl, hHi = rHi & hi_cl;
|
long hLo = rLo & lo_cl, hHi = rHi & hi_cl;
|
||||||
if (Slot.increasing(d + 1)) {
|
if (Slot.increasing(d)) {
|
||||||
if (hLo != 0) {
|
if (hLo != 0) {
|
||||||
rLo &= ((1L << Long.numberOfTrailingZeros(hLo)) - 1);
|
rLo &= ((1L << Long.numberOfTrailingZeros(hLo)) - 1);
|
||||||
rHi = 0;
|
rHi = 0;
|
||||||
@@ -415,7 +413,7 @@ public record SwedishGenerator(Rng rng) {
|
|||||||
}
|
}
|
||||||
if ((rLo | rHi) != 0) {
|
if ((rLo | rHi) != 0) {
|
||||||
hasSlots = true;
|
hasSlots = true;
|
||||||
if (Slot.horizv2(d)) covH.or(rLo, rHi);
|
if (Slot.horiz(d)) covH.or(rLo, rHi);
|
||||||
else covV.or(rLo, rHi);
|
else covV.or(rLo, rHi);
|
||||||
if ((Long.bitCount(rLo) + Long.bitCount(rHi)) < MIN_LEN) penalty += 8000;
|
if ((Long.bitCount(rLo) + Long.bitCount(rHi)) < MIN_LEN) penalty += 8000;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -19,9 +19,9 @@ import static puzzle.SwedishGenerator.*;
|
|||||||
|
|
||||||
public class ExportFormatTest {
|
public class ExportFormatTest {
|
||||||
|
|
||||||
static final byte CLUE_UP = 0;
|
static final byte CLUE_DOWN = 0;
|
||||||
static final byte CLUE_RIGHT = 1;
|
static final byte CLUE_RIGHT = 1;
|
||||||
static final byte CLUE_DOWN = 2;
|
static final byte CLUE_UP = 2;
|
||||||
static final byte CLUE_LEFT = 3;
|
static final byte CLUE_LEFT = 3;
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -34,8 +34,8 @@ public class ExportFormatTest {
|
|||||||
// This creates a slot starting at (0,1)
|
// This creates a slot starting at (0,1)
|
||||||
|
|
||||||
var clueMap = new HashMap<Integer, Long>();
|
var clueMap = new HashMap<Integer, Long>();
|
||||||
// key = (cellIndex << 3) | (direction + 1)
|
// key = (cellIndex << 2) | (direction)
|
||||||
var key = (0 << 3) | (CLUE_RIGHT + 1);
|
var key = (0 << 2) | (CLUE_RIGHT);
|
||||||
clueMap.put(key, Lemma.from("TEST"));
|
clueMap.put(key, Lemma.from("TEST"));
|
||||||
|
|
||||||
// Manually fill the grid letters for "TEST" at (0,1), (0,2), (0,3), (0,4)
|
// Manually fill the grid letters for "TEST" at (0,1), (0,2), (0,3), (0,4)
|
||||||
|
|||||||
@@ -19,9 +19,9 @@ public class MainTest {
|
|||||||
static final byte LETTER_A = (byte) 'A';
|
static final byte LETTER_A = (byte) 'A';
|
||||||
static final byte LETTER_B = (byte) 'B';
|
static final byte LETTER_B = (byte) 'B';
|
||||||
static final byte LETTER_Z = (byte) 'Z';
|
static final byte LETTER_Z = (byte) 'Z';
|
||||||
static final byte CLUE_UP = 0;
|
static final byte CLUE_DOWN = 0;
|
||||||
static final byte CLUE_RIGHT = 1;
|
static final byte CLUE_RIGHT = 1;
|
||||||
static final byte CLUE_DOWN = 2;
|
static final byte CLUE_UP = 2;
|
||||||
static final byte CLUE_LEFT = 3;
|
static final byte CLUE_LEFT = 3;
|
||||||
|
|
||||||
static final int OFF_0_0 = Grid.offset(0, 0);
|
static final int OFF_0_0 = Grid.offset(0, 0);
|
||||||
@@ -55,10 +55,10 @@ public class MainTest {
|
|||||||
@Test
|
@Test
|
||||||
void testStaticSlotMethods() {
|
void testStaticSlotMethods() {
|
||||||
// Test static horiz
|
// Test static horiz
|
||||||
// dir 2 (right) is horizontal
|
// dir 1 (right) is horizontal
|
||||||
assertTrue(Slot.horizv2(1));
|
assertTrue(Slot.horiz(1));
|
||||||
// dir 3 (down) is vertical
|
// dir 0 (down) is vertical
|
||||||
assertFalse(Slot.horizv2(2));
|
assertFalse(Slot.horiz(0));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -77,10 +77,10 @@ public class MainTest {
|
|||||||
}
|
}
|
||||||
@Test
|
@Test
|
||||||
public void testHoriz() {
|
public void testHoriz() {
|
||||||
assertTrue(Slot.from(2, 0L, 0L).horiz());
|
assertTrue(Slot.from(1, 0L, 0L).horiz()); // Right
|
||||||
assertTrue(Slot.from(0, 0L, 0L).horiz());
|
assertTrue(Slot.from(3, 0L, 0L).horiz()); // Left
|
||||||
assertFalse(Slot.from(1, 0L, 0L).horiz());
|
assertFalse(Slot.from(0, 0L, 0L).horiz()); // Down
|
||||||
assertFalse(Slot.from(3, 0L, 0L).horiz());
|
assertFalse(Slot.from(2, 0L, 0L).horiz()); // Up
|
||||||
}
|
}
|
||||||
@Test
|
@Test
|
||||||
public void testGridBasics() {
|
public void testGridBasics() {
|
||||||
@@ -178,9 +178,9 @@ public class MainTest {
|
|||||||
// Regression baseline for seed search starting at 12347, pop 4, gens 20
|
// Regression baseline for seed search starting at 12347, pop 4, gens 20
|
||||||
Assertions.assertEquals(12348, foundSeed, "Found seed changed");
|
Assertions.assertEquals(12348, foundSeed, "Found seed changed");
|
||||||
Assertions.assertEquals(18, res.filled().clueMap().size(), "Number of assigned words changed");
|
Assertions.assertEquals(18, res.filled().clueMap().size(), "Number of assigned words changed");
|
||||||
Assertions.assertEquals("DISCO", Lemma.asWord(res.filled().clueMap().get(476)));
|
Assertions.assertEquals("TROTS", Lemma.asWord(res.filled().clueMap().get(282)));
|
||||||
Assertions.assertEquals(3332734179516361088L, res.filled().grid().grid().lo);
|
Assertions.assertEquals(74732156493031040L, res.filled().grid().grid().lo);
|
||||||
Assertions.assertEquals(128L, res.filled().grid().grid().hi);
|
Assertions.assertEquals(193L, res.filled().grid().grid().hi);
|
||||||
}
|
}
|
||||||
boolean isLetter(byte b) { return (b & 64) != 0; }
|
boolean isLetter(byte b) { return (b & 64) != 0; }
|
||||||
@Test
|
@Test
|
||||||
|
|||||||
@@ -16,9 +16,9 @@ public class SwedishGeneratorTest {
|
|||||||
static final byte LETTER_C = (byte) 'C';
|
static final byte LETTER_C = (byte) 'C';
|
||||||
static final byte LETTER_X = (byte) 'X';
|
static final byte LETTER_X = (byte) 'X';
|
||||||
static final byte LETTER_Z = (byte) 'Z';
|
static final byte LETTER_Z = (byte) 'Z';
|
||||||
static final byte CLUE_UP = 0;
|
static final byte CLUE_DOWN = 0;
|
||||||
static final byte CLUE_RIGHT = 1;
|
static final byte CLUE_RIGHT = 1;
|
||||||
static final byte CLUE_DOWN = 2;
|
static final byte CLUE_UP = 2;
|
||||||
static final byte CLUE_LEFT = 3;
|
static final byte CLUE_LEFT = 3;
|
||||||
|
|
||||||
static final int OFF_0_0 = Grid.offset(0, 0);
|
static final int OFF_0_0 = Grid.offset(0, 0);
|
||||||
@@ -36,7 +36,7 @@ public class SwedishGeneratorTest {
|
|||||||
@Test
|
@Test
|
||||||
void testPatternForSlotAllLetters() {
|
void testPatternForSlotAllLetters() {
|
||||||
var grid = new Grid(new byte[]{ LETTER_A, LETTER_B, LETTER_C });
|
var grid = new Grid(new byte[]{ LETTER_A, LETTER_B, LETTER_C });
|
||||||
var slot = Slot.from(18 << Slot.BIT_FOR_DIR | (CLUE_RIGHT + 1), 7L, 0L);
|
var slot = Slot.from(18 << Slot.BIT_FOR_DIR | (CLUE_RIGHT), 7L, 0L);
|
||||||
long pattern = patternForSlot(grid, slot);
|
long pattern = patternForSlot(grid, slot);
|
||||||
|
|
||||||
assertEquals(1 | (2 << 5) | (3 << 10), pattern);
|
assertEquals(1 | (2 << 5) | (3 << 10), pattern);
|
||||||
@@ -45,7 +45,7 @@ public class SwedishGeneratorTest {
|
|||||||
@Test
|
@Test
|
||||||
void testPatternForSlotMixed() {
|
void testPatternForSlotMixed() {
|
||||||
var grid = new Grid(new byte[]{ LETTER_A, DASH, LETTER_C });
|
var grid = new Grid(new byte[]{ LETTER_A, DASH, LETTER_C });
|
||||||
var slot = Slot.from(1 << Slot.BIT_FOR_DIR | (CLUE_RIGHT + 1), 7L, 0L);
|
var slot = Slot.from(1 << Slot.BIT_FOR_DIR | (CLUE_RIGHT), 7L, 0L);
|
||||||
long pattern = patternForSlot(grid, slot);
|
long pattern = patternForSlot(grid, slot);
|
||||||
|
|
||||||
assertEquals(1 | (0 << 5) | (3 << 10), pattern);
|
assertEquals(1 | (0 << 5) | (3 << 10), pattern);
|
||||||
@@ -54,7 +54,7 @@ public class SwedishGeneratorTest {
|
|||||||
@Test
|
@Test
|
||||||
void testPatternForSlotAllDashes() {
|
void testPatternForSlotAllDashes() {
|
||||||
var grid = new Grid(new byte[]{ DASH, DASH, DASH }); // - - -
|
var grid = new Grid(new byte[]{ DASH, DASH, DASH }); // - - -
|
||||||
var slot = Slot.from(1 << Slot.BIT_FOR_DIR | (CLUE_RIGHT + 1), 7L, 0L);
|
var slot = Slot.from(1 << Slot.BIT_FOR_DIR | (CLUE_RIGHT), 7L, 0L);
|
||||||
long pattern = patternForSlot(grid, slot);
|
long pattern = patternForSlot(grid, slot);
|
||||||
|
|
||||||
assertEquals(0, pattern);
|
assertEquals(0, pattern);
|
||||||
@@ -63,7 +63,7 @@ public class SwedishGeneratorTest {
|
|||||||
@Test
|
@Test
|
||||||
void testPatternForSlotSingleLetter() {
|
void testPatternForSlotSingleLetter() {
|
||||||
var grid = new Grid(new byte[]{ LETTER_A, DASH, DASH });
|
var grid = new Grid(new byte[]{ LETTER_A, DASH, DASH });
|
||||||
var slot = Slot.from(1 << Slot.BIT_FOR_DIR | (CLUE_RIGHT + 1), 7L, 0L);
|
var slot = Slot.from(1 << Slot.BIT_FOR_DIR | (CLUE_RIGHT), 7L, 0L);
|
||||||
long pattern = patternForSlot(grid, slot);
|
long pattern = patternForSlot(grid, slot);
|
||||||
|
|
||||||
assertEquals(1, pattern);
|
assertEquals(1, pattern);
|
||||||
@@ -157,7 +157,7 @@ public class SwedishGeneratorTest {
|
|||||||
// key = (r << 8) | (c << 4) | d
|
// key = (r << 8) | (c << 4) | d
|
||||||
var offset = OFF_2_3;
|
var offset = OFF_2_3;
|
||||||
System.out.println("[DEBUG_LOG] Grid.offset(2, 3) = " + offset);
|
System.out.println("[DEBUG_LOG] Grid.offset(2, 3) = " + offset);
|
||||||
var key = (offset << Slot.BIT_FOR_DIR) | (CLUE_DOWN + 1);
|
var key = (offset << Slot.BIT_FOR_DIR) | (CLUE_DOWN);
|
||||||
System.out.println("[DEBUG_LOG] key = " + key);
|
System.out.println("[DEBUG_LOG] key = " + key);
|
||||||
long lo = 0;
|
long lo = 0;
|
||||||
// pos 0: (2, 5)
|
// pos 0: (2, 5)
|
||||||
@@ -170,7 +170,7 @@ public class SwedishGeneratorTest {
|
|||||||
var s = Slot.from(key, lo, 0L);
|
var s = Slot.from(key, lo, 0L);
|
||||||
System.out.println("[DEBUG_LOG] s.dir() = " + Slot.dir(s.key()));
|
System.out.println("[DEBUG_LOG] s.dir() = " + Slot.dir(s.key()));
|
||||||
assertEquals(OFF_2_3, s.clueIndex());
|
assertEquals(OFF_2_3, s.clueIndex());
|
||||||
assertEquals(CLUE_DOWN + 1, Slot.dir(s.key()));
|
assertEquals(CLUE_DOWN, Slot.dir(s.key()));
|
||||||
assertFalse(s.horiz());
|
assertFalse(s.horiz());
|
||||||
var cells = s.walk().toArray();
|
var cells = s.walk().toArray();
|
||||||
assertEquals(2, Grid.r(cells[0]));
|
assertEquals(2, Grid.r(cells[0]));
|
||||||
@@ -180,8 +180,8 @@ public class SwedishGeneratorTest {
|
|||||||
assertEquals(5, Grid.c(cells[1]));
|
assertEquals(5, Grid.c(cells[1]));
|
||||||
assertEquals(5, Grid.c(cells[2]));
|
assertEquals(5, Grid.c(cells[2]));
|
||||||
|
|
||||||
assertTrue(Slot.horizv2(CLUE_RIGHT)); // right
|
assertTrue(Slot.horiz(CLUE_RIGHT)); // right
|
||||||
assertFalse(Slot.horizv2(CLUE_DOWN)); // down
|
assertFalse(Slot.horiz(CLUE_DOWN)); // down
|
||||||
}
|
}
|
||||||
static int intersectSorted(int[] a, int aLen, int[] b, int bLen, int[] out) {
|
static int intersectSorted(int[] a, int aLen, int[] b, int bLen, int[] out) {
|
||||||
if (aLen == 0 || bLen == 0) return 0;
|
if (aLen == 0 || bLen == 0) return 0;
|
||||||
@@ -269,7 +269,7 @@ public class SwedishGeneratorTest {
|
|||||||
|
|
||||||
assertTrue(s.len() >= 2);
|
assertTrue(s.len() >= 2);
|
||||||
assertEquals(OFF_0_0, s.clueIndex());
|
assertEquals(OFF_0_0, s.clueIndex());
|
||||||
assertEquals(CLUE_RIGHT + 1, Slot.dir(s.key()));
|
assertEquals(CLUE_RIGHT, Slot.dir(s.key()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -315,7 +315,7 @@ public class SwedishGeneratorTest {
|
|||||||
void testPlaceWord() {
|
void testPlaceWord() {
|
||||||
var grid = Grid.createEmpty();
|
var grid = Grid.createEmpty();
|
||||||
// Slot at OFF_0_0 length 3, horizontal (right)
|
// Slot at OFF_0_0 length 3, horizontal (right)
|
||||||
var key = (OFF_0_0 << Slot.BIT_FOR_DIR) | (CLUE_RIGHT + 1);
|
var key = (OFF_0_0 << Slot.BIT_FOR_DIR) | (CLUE_RIGHT);
|
||||||
var lo = (1L << OFF_0_0) | (1L << OFF_0_1) | (1L << OFF_0_2);
|
var lo = (1L << OFF_0_0) | (1L << OFF_0_1) | (1L << OFF_0_2);
|
||||||
var s = Slot.from(key, lo, 0L);
|
var s = Slot.from(key, lo, 0L);
|
||||||
var w1 = Lemma.from("ABC");
|
var w1 = Lemma.from("ABC");
|
||||||
@@ -354,7 +354,7 @@ public class SwedishGeneratorTest {
|
|||||||
void testBacktrackingHelpers() {
|
void testBacktrackingHelpers() {
|
||||||
var grid = Grid.createEmpty();
|
var grid = Grid.createEmpty();
|
||||||
// Slot at 0,1 length 2
|
// Slot at 0,1 length 2
|
||||||
var key = (OFF_0_0 << Slot.BIT_FOR_DIR) | (CLUE_RIGHT + 1);
|
var key = (OFF_0_0 << Slot.BIT_FOR_DIR) | (CLUE_RIGHT);
|
||||||
var lo = (1L << OFF_0_1) | (1L << OFF_0_2);
|
var lo = (1L << OFF_0_1) | (1L << OFF_0_2);
|
||||||
var s = Slot.from(key, lo, 0L);
|
var s = Slot.from(key, lo, 0L);
|
||||||
var w = Lemma.from("AZ");
|
var w = Lemma.from("AZ");
|
||||||
@@ -374,14 +374,14 @@ public class SwedishGeneratorTest {
|
|||||||
@Test
|
@Test
|
||||||
void testInnerWorkings() {
|
void testInnerWorkings() {
|
||||||
// 1. Test Slot.increasing
|
// 1. Test Slot.increasing
|
||||||
assertFalse(Slot.increasing(CLUE_LEFT + 1)); // Left
|
assertFalse(Slot.increasing(CLUE_LEFT)); // Left
|
||||||
assertTrue(Slot.increasing(CLUE_RIGHT + 1)); // Right
|
assertTrue(Slot.increasing(CLUE_RIGHT)); // Right
|
||||||
assertTrue(Slot.increasing(CLUE_DOWN + 1)); // Down
|
assertTrue(Slot.increasing(CLUE_DOWN)); // Down
|
||||||
assertFalse(Slot.increasing(CLUE_UP + 1)); // Up
|
assertFalse(Slot.increasing(CLUE_UP)); // Up
|
||||||
|
|
||||||
var sInc = Slot.from((0 << Slot.BIT_FOR_DIR) | CLUE_RIGHT + 1, 1L, 0L);
|
var sInc = Slot.from((0 << Slot.BIT_FOR_DIR) | CLUE_RIGHT, 1L, 0L);
|
||||||
assertTrue(sInc.increasing());
|
assertTrue(sInc.increasing());
|
||||||
var sDec = Slot.from((0 << Slot.BIT_FOR_DIR) | CLUE_LEFT + 1, 1L, 0L);
|
var sDec = Slot.from((0 << Slot.BIT_FOR_DIR) | CLUE_LEFT, 1L, 0L);
|
||||||
assertFalse(sDec.increasing());
|
assertFalse(sDec.increasing());
|
||||||
|
|
||||||
// 2. Test slotScore
|
// 2. Test slotScore
|
||||||
|
|||||||
Reference in New Issue
Block a user