     GL_LINE_STRIP glBegin
     dup vertex
     dup visit
-    dup random-neighbour dup [
+    dup random-neighbour [
         (draw-maze) (draw-maze)
     ] [
-        2drop
+        drop
         glEnd
         GL_LINE_STRIP glBegin
-    ] if ;
+    ] if* ;
 
 : draw-maze ( n -- )
     line-width 2 - glLineWidth


M: maze pref-dim* drop { 400 400 } ;

MAIN-WINDOW: maze-window { { title "Maze" } }
    <maze> >>gadgets ;

MAIN: maze-window

! From http://www.ffconsultancy.com/ocaml/maze/index.html
USING: accessors arrays kernel math math.order math.vectors
namespaces opengl.demo-support opengl.gl random sequences ui
ui.gadgets ui.gadgets.canvas ui.gestures ui.render ;
IN: maze

CONSTANT: line-width 8
