2017-05-18 23:19:13 -04:00
|
|
|
# 6 set $seed
|
|
|
|
execute-file maze.cmd
|
|
|
|
|
|
|
|
set %thisbuf $cbufname
|
|
|
|
|
2019-06-22 02:03:15 -04:00
|
|
|
store-procedure pushxy # push x y
|
2017-05-18 23:19:13 -04:00
|
|
|
set %x $curcol
|
|
|
|
set %y $curline
|
|
|
|
select-buffer stack
|
|
|
|
beginning-of-file
|
|
|
|
insert-string %x
|
|
|
|
newline
|
|
|
|
insert-string %y
|
|
|
|
newline
|
|
|
|
select-buffer %thisbuf
|
|
|
|
!endm
|
|
|
|
|
2019-06-22 02:03:15 -04:00
|
|
|
store-procedure popxy # pop x y
|
2017-05-18 23:19:13 -04:00
|
|
|
select-buffer stack
|
|
|
|
beginning-of-file
|
|
|
|
set %x $line
|
|
|
|
1 kill-to-end-of-line
|
|
|
|
set %y $line
|
|
|
|
1 kill-to-end-of-line
|
|
|
|
select-buffer %thisbuf
|
|
|
|
set $curline %y
|
|
|
|
set $curcol %x
|
|
|
|
!endm
|
|
|
|
|
|
|
|
set $curline 1
|
|
|
|
set $curcol 0
|
2019-06-22 02:03:15 -04:00
|
|
|
run pushxy #push stop position
|
2017-05-18 23:19:13 -04:00
|
|
|
set %x 1
|
|
|
|
set $curline 4
|
|
|
|
set $curcol %x
|
|
|
|
set %OC $curchar
|
|
|
|
set %NC &asc "█"
|
|
|
|
!while ¬ &equ %x 0
|
|
|
|
set $curchar %NC
|
|
|
|
set %cc $curcol
|
|
|
|
set %ll $curline
|
|
|
|
set $curcol &add %cc 1
|
|
|
|
!if &equ $curchar %OC
|
2019-06-22 02:03:15 -04:00
|
|
|
run pushxy
|
2017-05-18 23:19:13 -04:00
|
|
|
!endif
|
|
|
|
set $curcol &add %cc -1
|
|
|
|
!if &equ $curchar %OC
|
2019-06-22 02:03:15 -04:00
|
|
|
run pushxy
|
2017-05-18 23:19:13 -04:00
|
|
|
!endif
|
|
|
|
set $curline &add %ll 1
|
|
|
|
set $curcol %cc
|
|
|
|
!if &equ $curchar %OC
|
2019-06-22 02:03:15 -04:00
|
|
|
run pushxy
|
2017-05-18 23:19:13 -04:00
|
|
|
!endif
|
|
|
|
set $curline &add %ll -1
|
|
|
|
set $curcol %cc
|
|
|
|
!if &equ $curchar %OC
|
2019-06-22 02:03:15 -04:00
|
|
|
run pushxy
|
2017-05-18 23:19:13 -04:00
|
|
|
!endif
|
2019-06-22 02:03:15 -04:00
|
|
|
run popxy
|
2017-05-18 23:19:13 -04:00
|
|
|
!endwhile
|
|
|
|
set $curline 3
|
|
|
|
set $curcol 1
|
2021-07-21 04:40:36 -04:00
|
|
|
select-buffer stack
|
|
|
|
unmark-buffer
|
|
|
|
select-buffer %thisbuf
|
|
|
|
unmark-buffer
|
|
|
|
delete-buffer stack
|