introduce bitloops
This commit is contained in:
@@ -6,7 +6,6 @@ import lombok.experimental.Delegate;
|
||||
import lombok.val;
|
||||
import precomp.Const9x8.Cell;
|
||||
import puzzle.Export.Gridded.Replacar.Rell;
|
||||
import puzzle.Export.LetterVisit.LetterAt;
|
||||
import puzzle.Masker.Clues;
|
||||
import puzzle.SwedishGenerator.Dict;
|
||||
import puzzle.SwedishGenerator.FillResult;
|
||||
@@ -110,19 +109,6 @@ public record Export() {
|
||||
}
|
||||
}
|
||||
|
||||
interface LetterVisit {
|
||||
|
||||
record LetterAt(int index, byte letter) {
|
||||
|
||||
public int row() { return INDEX_ROW(index); }
|
||||
public int col() { return INDEX_COL(index); }
|
||||
public char human() { return LETTER(letter); }
|
||||
static LetterAt from(int index, byte[] bytes) { return new LetterAt(index, bytes[index]); }
|
||||
public int index(int cols) { return (row() * cols) + col(); }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
record Gridded(@Delegate Grid grid, Clues cl)
|
||||
implements Stream<LetterAt> {
|
||||
|
||||
@@ -301,4 +287,12 @@ public record Export() {
|
||||
}
|
||||
}
|
||||
|
||||
record LetterAt(int index, byte letter) {
|
||||
|
||||
public int row() { return INDEX_ROW(index); }
|
||||
public int col() { return INDEX_COL(index); }
|
||||
public char human() { return LETTER(letter); }
|
||||
static LetterAt from(int index, byte[] bytes) { return new LetterAt(index, bytes[index]); }
|
||||
public int index(int cols) { return (row() * cols) + col(); }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ import precomp.Neighbors9x8.rci;
|
||||
import puzzle.Export.ClueAt;
|
||||
import puzzle.Export.Clued;
|
||||
import puzzle.Export.Gridded;
|
||||
import puzzle.Export.LetterVisit.LetterAt;
|
||||
import puzzle.Export.LetterAt;
|
||||
import puzzle.Export.PuzzleResult;
|
||||
import puzzle.Export.Rewards;
|
||||
import puzzle.Main.Opts;
|
||||
|
||||
@@ -10,7 +10,7 @@ import precomp.Neighbors9x8.rci;
|
||||
import puzzle.DictJavaGeneratorMulti.DictEntryDTO.IntListDTO;
|
||||
import puzzle.Export.Clued;
|
||||
import puzzle.Export.Gridded;
|
||||
import puzzle.Export.LetterVisit.LetterAt;
|
||||
import puzzle.Export.LetterAt;
|
||||
import puzzle.Masker.Clues;
|
||||
import puzzle.Masker.Slot;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user