redo
This commit is contained in:
@@ -59,7 +59,6 @@ public class Main {
|
||||
void main(String[] args) {
|
||||
_main(args);
|
||||
}
|
||||
@SneakyThrows
|
||||
public void _main(String[] args) {
|
||||
var opts = parseArgs(args);
|
||||
|
||||
@@ -254,9 +253,9 @@ public class Main {
|
||||
// Package-private method for testing
|
||||
PuzzleResult generatePuzzle(Opts opts) {
|
||||
|
||||
var tLoad0 = System.nanoTime();
|
||||
var tLoad0 = System.nanoTime();
|
||||
Dict dict = puzzle.dict800.DictData800.DICT800;//loadDict(opts.wordsPath);
|
||||
var tLoad1 = System.nanoTime();
|
||||
var tLoad1 = System.nanoTime();
|
||||
|
||||
section("Load");
|
||||
info(String.format(Locale.ROOT, "words : %,d", dict.length()));
|
||||
@@ -370,9 +369,9 @@ public class Main {
|
||||
//val mask = generateClues();
|
||||
if (mask == null) return null;
|
||||
|
||||
val slotInfo = Masker.slots(mask, dict.index());
|
||||
val slotInfo = Masker.slots(mask, dict.index(), dict.reversed());
|
||||
var grid = Slotinfo.grid(slotInfo);// mask.toGrid();
|
||||
var filled = fillMask(rng, slotInfo, grid);
|
||||
var filled = fillMask(rng, slotInfo, grid.lo, grid.hi, grid.g);
|
||||
|
||||
if (!multiThreaded) {
|
||||
System.out.print("\r" + " ".repeat(120 - "".length()) + "\r");
|
||||
@@ -405,6 +404,8 @@ public class Main {
|
||||
//System.out.println(Arrays.stream(new Clued(mask).gridToString().split("\n")).map(s -> "\"" + s + "\\n\" +").collect(Collectors.joining("\n")));
|
||||
}
|
||||
if (filled.ok()) {
|
||||
grid.lo = ~mask.lo;
|
||||
grid.hi = 0xFFL & ~mask.hi;
|
||||
return new PuzzleResult(new Signa(mask), new Puzzle(grid, mask), slotInfo, filled);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user