introduce bitloops
This commit is contained in:
@@ -373,34 +373,6 @@ public class Main {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
static Clued generateClues() {
|
||||
String simple = "000 3000\n" +
|
||||
" 3 \n" +
|
||||
" 31 \n" +
|
||||
" 3\n" +
|
||||
"1 \n" +
|
||||
"1 \n" +
|
||||
"1 2\n" +
|
||||
"1 222 3";
|
||||
String sampleComplex = "1 0000\n" +
|
||||
"1 \n" +
|
||||
"00 01 \n" +
|
||||
" 1 \n" +
|
||||
" 1 \n" +
|
||||
" 2 1 \n" +
|
||||
" 1 \n" +
|
||||
"221 22\n";
|
||||
String def = " 30000\n" +
|
||||
"0 001 \n" +
|
||||
" 1 \n" +
|
||||
" 3 \n" +
|
||||
" 3 \n" +
|
||||
" 32 \n" +
|
||||
" 32 2\n" +
|
||||
"2222 3";
|
||||
return Clues.parse(sampleComplex
|
||||
);
|
||||
}
|
||||
static Clues generateNewClues(Rng rng, Opts opts) {
|
||||
var masker = new Masker(rng, new int[STACK_SIZE], Masker.Clues.createEmpty());
|
||||
return masker.generateMask(opts.clueSize, opts.pop, opts.gens, opts.offspring);
|
||||
@@ -415,7 +387,7 @@ public class Main {
|
||||
|
||||
val slotInfo = Masker.slots(mask, dict.index());
|
||||
var grid = Slotinfo.grid(slotInfo);// mask.toGrid();
|
||||
var filled = fillMask(rng, slotInfo, grid, (!Main.VERBOSE || multiThreaded));
|
||||
var filled = fillMask(rng, slotInfo, grid);
|
||||
|
||||
if (!multiThreaded) {
|
||||
System.out.print("\r" + Strings.padRight("", 120) + "\r");
|
||||
@@ -451,7 +423,7 @@ 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() && (opts.minSimplicity <= 0 || filled.stats().simplicity >= opts.minSimplicity)) {
|
||||
return new PuzzleResult(new Clued(mask), new Gridded(grid), slotInfo, filled);
|
||||
return new PuzzleResult(new Clued(mask), new Gridded(grid, mask), slotInfo, filled);
|
||||
}
|
||||
|
||||
if (opts.verbose && filled.ok()) {
|
||||
|
||||
Reference in New Issue
Block a user