introduce bitloops
This commit is contained in:
@@ -4,6 +4,7 @@ import module java.base;
|
||||
import com.google.gson.Gson;
|
||||
import lombok.val;
|
||||
import puzzle.SwedishGenerator.Lemma;
|
||||
import static puzzle.SwedishGenerator.THRESS;
|
||||
public class Meta {
|
||||
|
||||
static final Gson GSON = new Gson();
|
||||
@@ -42,8 +43,9 @@ public class Meta {
|
||||
return new ShardLem(Lemma.from("XXX"), -1, new String[0]);
|
||||
}
|
||||
}
|
||||
static final Path[] SHARDS = IntStream.range(0, 10).mapToObj(sId -> Path.of("src/main/generated-sources/puzzle").resolve(sId + ".idx")).toArray(
|
||||
Path[]::new);
|
||||
static final Path[] SHARDS = IntStream.range(0, 10).mapToObj(sId -> Path.of("src/main/generated-sources/puzzle" + (THRESS == 0 ? "" : "/dict" + THRESS)).resolve(sId + ".idx"))
|
||||
.toArray(
|
||||
Path[]::new);
|
||||
static Path shardKey(long word) {
|
||||
return SHARDS[Lemma.unpackSize(word) + 1];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user