chiark / gitweb /
14b done
authorBen Harris <bjh21@bjh21.me.uk>
Tue, 14 May 2024 16:19:58 +0000 (17:19 +0100)
committerBen Harris <bjh21@bjh21.me.uk>
Tue, 14 May 2024 16:19:58 +0000 (17:19 +0100)
I dodged the bug by sticking the floor on by simpler means.

14/14b.bqn

index c2ec0171ca19705ca05a07e7e24f1f3aa94ad85f..dba86fa90b66406e7168802e40d8fcb19429fad1 100644 (file)
@@ -25,10 +25,10 @@ RectIndices←{
 
 Plot←{
   # Assume all co-ordinates are positive.
-  ⟨max_x, max_y⟩ ← (⟨1,3⟩+⌈˝>∾𝕩)
-  max_x ↩ max_x ⌈ 500+max_y
+  ⟨max_x, max_y⟩ ← (1+⌈˝>∾𝕩)
+  max_x ↩ max_x ⌈ 502+max_y
   map←⟨max_x,max_y⟩⥊0
-  map ↩ 1¨⌾(¯1⊸⊏˘) map # Solid floor
+  map ↩ ∾⟜⟨0,1⟩˘map
   {𝕊⟨from,to⟩:
     map ↩ 1¨⌾((from RectIndices to)⊸⊑) map
   }˘∾2↕¨𝕩