introduce bitloops
This commit is contained in:
@@ -6,6 +6,7 @@ import lombok.experimental.Delegate;
|
||||
import lombok.val;
|
||||
import puzzle.Export.Gridded.Replacar.Cell;
|
||||
import puzzle.SwedishGenerator.Clues;
|
||||
import puzzle.SwedishGenerator.DictEntry;
|
||||
import puzzle.SwedishGenerator.FillResult;
|
||||
import puzzle.SwedishGenerator.Grid;
|
||||
import java.util.ArrayList;
|
||||
@@ -197,10 +198,11 @@ public record Export() {
|
||||
var g = filled().grid();
|
||||
var placed = new ArrayList<Placed>();
|
||||
var clueMap = filled().clueMap();
|
||||
val entries = new DictEntry[10];
|
||||
mask.forEachSlot((int key, long lo, long hi) -> {
|
||||
var word = clueMap[key];
|
||||
if (word != 0L) {
|
||||
placed.add(extractPlacedFromSlot(Slot.from(key, lo, hi), word));
|
||||
placed.add(extractPlacedFromSlot(Slot.from(key, lo, hi, entries[Slot.length(lo, hi)]), word));
|
||||
} else {
|
||||
System.err.println("Could not find clue for slot: " + key);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user