redo
This commit is contained in:
@@ -3,6 +3,7 @@ package puzzle;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.experimental.Delegate;
|
||||
import lombok.val;
|
||||
import precomp.Mask;
|
||||
import puzzle.Masker.Slot;
|
||||
import puzzle.Meta.ShardLem;
|
||||
import puzzle.SwedishGenerator.Lemma;
|
||||
@@ -87,20 +88,6 @@ public class Riddle {
|
||||
|
||||
public record Vestigium(int index, int clue) { }
|
||||
|
||||
record Placed(long lemma, int slotKey, rci[] cells) {
|
||||
|
||||
public static final char HORIZONTAL = 'h';
|
||||
static final char VERTICAL = 'v';
|
||||
static final char[] DIRECTION = { Placed.VERTICAL, Placed.HORIZONTAL, Placed.VERTICAL, Placed.HORIZONTAL, Placed.VERTICAL, Placed.VERTICAL };
|
||||
|
||||
public int arrowCol() { return cells[0].c(); }
|
||||
public int arrowRow() { return cells[0].r(); }
|
||||
public int startRow() { return cells[1].r(); }
|
||||
public int startCol() { return cells[1].c(); }
|
||||
public boolean isReversed() { return !Slotinfo.increasing(slotKey); }
|
||||
public char direction() { return DIRECTION[Slot.dir(slotKey)]; }
|
||||
}
|
||||
|
||||
public record ExportedPuzzle(String[] grid, WordOut[] words, int difficulty, Rewards rewards) { }
|
||||
|
||||
public record Rewards(int coins, int stars, int hints) { }
|
||||
@@ -174,4 +161,18 @@ public class Riddle {
|
||||
return stream.build();
|
||||
}
|
||||
}
|
||||
|
||||
public record Placed(long lemma, int slotKey, Mask[] cells) {
|
||||
|
||||
public static final char HORIZONTAL = 'h';
|
||||
static final char VERTICAL = 'v';
|
||||
static final char[] DIRECTION = { Placed.VERTICAL, Placed.HORIZONTAL, Placed.VERTICAL, Placed.HORIZONTAL, Placed.VERTICAL, Placed.VERTICAL };
|
||||
|
||||
public int arrowCol() { return cells[0].c(); }
|
||||
public int arrowRow() { return cells[0].r(); }
|
||||
public int startRow() { return cells[1].r(); }
|
||||
public int startCol() { return cells[1].c(); }
|
||||
public boolean isReversed() { return !Slotinfo.increasing(slotKey); }
|
||||
public char direction() { return DIRECTION[Slot.dir(slotKey)]; }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user