This commit is contained in:
mike
2026-01-24 01:43:41 +01:00
parent b8fc6581e1
commit f61d04bb61
3 changed files with 21 additions and 22 deletions

View File

@@ -17,5 +17,12 @@ public sealed interface Mask
int place();
byte d();
default byte letter() { return (byte) (d() | 64); }
default byte clueChar() { return (byte) (d() | 48); }
default void letter(byte[] template, int minR, int minC, int height, int width) {
int rr = r() - minR;
int cc = c() - minC;
if (rr >= 0 && rr < height && cc >= 0 && cc < width) {
template[rr * (width + 1) + cc] = letter();
}
}
default byte clueChar() { return (byte) (d() | 48); }
}