| Bytes | Lang | Time | Link |
|---|---|---|---|
| 034 | Jelly | 250330T173548Z | Jonathan |
| 058 | Charcoal | 250330T003046Z | Neil |
Jelly, 34 bytes
Ḃr1Ḥṁa5B¬¤7_BZ«ḷþm2Ɗṙ1Ṛ;UƊṁṙHĊ×ḂƲḂ
A monadic Link that accepts the side length (\$\ge 5\$) and yields a list of lists of ones (white / clue area) and zeros (black / background).
Try it online! (The footer formats each as a grid, which spaces them to be more square, replace G with Y if you prefer no spaces.)
(Admittedly, they're not very intricate, so they are not that pretty, but they adhere to the specification.)
How?
Ḃr1Ḥṁa5B¬¤7_BZ«ḷþm2Ɗṙ1Ṛ;UƊṁṙHĊ×ḂƲḂ - Link: integer, Side
Ḃ - {Side} mod 2
r1 - inclusive range to 1 -> odd:[1] even:[0,1]
Ḥ - double -> [2] or [0,2]
ṁ - mould like {[1..Side]}
-> Reps = [2,2,2,...] or [0,2,0,...]
¤ - nilad followed by link(s) as a nilad:
5 - five
B - to binary
¬ - logical NOT -> [0,1,0]
a - {Reps} logical AND {[0,1,0]}
(replace first three of Reps with [0,1,0])
7_ - seven minus {that}
-> [7,6,7,5,5,5,5,5,...,5,5] if Side is odd
[7,6,7,5,7,5,7,5,...,7,5] if Side is even
...of length Side.
BZ - convert to binary and transpose
-> RowsAB&C
Ɗ - last three links as a monad - f(Side):
ḷþ - {[1..Side]} left-arg {[1..Side} table
-> M = [[1..Side]] * Side
2 - two
m - {2} slice {M}
-> H = [[1..Side]] * ((Side + 1) // 2)
« - {RowsAB&C} minimum {H} (vectorises)
-> H with RowsAB&C as the first three rows
ṙ1 - rotate left one (moving Row A to the bottom)
Ṛ;UƊ - reversed concatenated with each-reversed
ṁ - mould like {[1..Side]} (remove last row if odd)
-> PuzzleRows
Ʋ - last four links as a monad - f(Side):
H - halve {Side}
Ċ - ceiling of {that}
Ḃ - {Side} mod 2
× - {Ceil(Side/2)} multiply {Side mod 2}
ṙ - rotate {PuzzleRows} left by {that}
Ḃ - mod 2
Charcoal, 58 bytes
NθM﹪θ²↑UO⊘⊕θO#¶OOM﹪θ²↘×#⊖⊘θ⟲OO²⁴⁶﹪θ²J⊘⊖θ⊖⊘θ≡﹪θ⁴¦⁰O#¶#³#↘##
Try it online! Link is to verbose version of code. Uses Os instead of _s as I think it looks nicer. Explanation:
Nθ
Input N.
M﹪θ²↑UO⊘⊕θO#¶OO
Draw a cross-hatch to fill the top left ¼ of the crossword. For odd sizes, the cross-hatch starts at the corner, but for even sizes it's vertically offset. (The code actually performs the reverse operation, drawing an offset cross-hatch by default but undoing the offset for odd sizes.)
M﹪θ²↘×#⊖⊘θ
For even sizes, erase the first line, while for odd sizes, erase all but the first character on the second line.
⟲OO²⁴⁶﹪θ²
Rotate to mostly complete the other ¾ of the crossword.
J⊘⊖θ⊖⊘θ≡﹪θ⁴¦⁰O#¶#³#↘##
Fix up some edge cases. (Well, they're in the centre, not on the edge, but you know what I mean.)