RosettaCodeData/Task/Maze-solving/Uiua/maze-solving.uiua
2026-02-01 16:33:20 -08:00

8 lines
304 B
Text
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

~ "maze-generation.ua" ~ GetWall H Maze N₄ W
Maze
Start ← 1_1
End ← -Start ×2 H_W
# (pos grid) -> 1-4 next steps, without walls in the way.
Ns ← ≡⊡1▽:⟜(≡(=@ ⊡)⊙¤≡GetWall)≡⊟¤⊃⋅∘∘ ⊸N₄
path(Ns|≍End) Start # Solve (djikstra)
$"_ moves"⧻⟜(∧⍜⊡⋅@O)⊢