introduce bitloops
This commit is contained in:
@@ -6,7 +6,6 @@ import lombok.experimental.Delegate;
|
||||
import lombok.val;
|
||||
import puzzle.Export.Gridded.Replacar.Cell;
|
||||
import puzzle.SwedishGenerator.Clues;
|
||||
import puzzle.SwedishGenerator.Dict;
|
||||
import puzzle.SwedishGenerator.FillResult;
|
||||
import puzzle.SwedishGenerator.Grid;
|
||||
import java.util.ArrayList;
|
||||
@@ -47,7 +46,7 @@ public record Export() {
|
||||
for (var c = 0; c < C; c++) {
|
||||
val idx = Grid.offset(r, c);
|
||||
if (mask.isClue(idx))
|
||||
sb.append((char) mask.digitAt(idx));
|
||||
sb.append((char) (mask.digitAt(idx) | 48));
|
||||
else {
|
||||
sb.append(' ');
|
||||
}
|
||||
@@ -182,7 +181,7 @@ public record Export() {
|
||||
|
||||
public record ExportedPuzzle(String[] grid, WordOut[] words, int difficulty, Rewards rewards) { }
|
||||
|
||||
public record PuzzleResult(SwedishGenerator swe, Dict dict, Clued mask, FillResult filled) {
|
||||
public record PuzzleResult(Clued mask, FillResult filled) {
|
||||
|
||||
boolean inBounds(int idx) { return idx >= 0 && idx < SwedishGenerator.SIZE; }
|
||||
Placed extractPlacedFromSlot(Slot s, long lemma) { return new Placed(lemma, s.key(), s.walk().toArray()); }
|
||||
|
||||
Reference in New Issue
Block a user