Boxworld



\START82\
\NAME=BOXWORLD
:StoreGDB GDB6:FnOff :GridOff:AxesOff:PlotsOff :ClrDraw:FullScreen:0\ >\\#\
Xmin:94\->\Xmax:0\->\Ymin:62\->\Ymax:Normal:getKey
:dim A]\->\\L6\
:\L6\(1)\->\R
:\L6\(2)\->\C
:0\->\dim \L6\
:A](R-2,1)\->\N
:A](R-2,2)\->\P
:A](R-1,1)\->\G
:A](R-1,2)\->\H
:A](R,1)\->\\@\
:R-3\->\R
:Lbl A
:For(A,1,R
:For(B,1,C
:prgmZZBOX
:End
:End
:Lbl B
:\(-)\6G+67-P\->\B:5(H-1)+N\->\A
:Pt-On(A+1,B
:Pt-On(A+2,B
:Pt-On(A+3,B
:Pt-On(A+1,B-1
:Pt-On(A+2,B-1
:Pt-On(A+3,B-1
:Pt-On(A+2,B-2
:Pt-On(A+1,B-3
:Pt-On(A+2,B-3
:Pt-On(A+3,B-3
:Pt-On(A+2,B-4
:Pt-On(A+1,B-5
:Pt-On(A+3,B-5
:0\->\K
:Repeat (K\>=\24 and K\<=\26) or K=34 or K=22
:getKey\->\K
:End
:If K=22:Goto \@\
:G\->\U:H\->\V
:If K=24 and H\>=\2:Then
:If A](G,H-1)\<=\1:Then
:H-1\->\H
:Else
:If A](G,H-1)\<=\3 and H\>=\3:Then
:If A](G,H-1)=2:Then
:If A](G,H-2)\<=\0:Then
:2\->\A](G,H-2):G\->\A:H-2\->\B
:\(-)\6A+67-P\->\J
:5(B-1)+N\->\I
:For(Z,I,I+4
:Line(Z,J,Z,J-5,0
:End
:prgmZZBOX
:0\->\A](G,H-1):G\->\A:H-1\->\B
:prgmZZBOX
:H-1\->\H
:Else
:If A](G,H-2)=1:Then
:3\->\A](G,H-2):G\->\A:H-2\->\B
:\(-)\6A+67-P\->\J
:5(B-1)+N\->\I
:For(Z,I,I+4
:Line(Z,J,Z,J-5,0
:End
:prgmZZBOX
:0\->\A](G,H-1):G\->\A:H-1\->\B
:prgmZZBOX
:H-1\->\H
:\@\-1\->\\@\
:End
:End
:Else
:If A](G,H-1)=3:Then
:If A](G,H-2)\<=\0:Then
:2\->\A](G,H-2):G\->\A:H-2\->\B
:\(-)\6A+67-P\->\J
:5(B-1)+N\->\I
:For(Z,I,I+4
:Line(Z,J,Z,J-5,0
:End
:prgmZZBOX
:1\->\A](G,H-1):G\->\A:H-1\->\B
:\(-)\6A+67-P\->\J
:5(B-1)+N\->\I
:For(Z,I,I+4
:Line(Z,J,Z,J-5,0
:End
:prgmZZBOX
:H-1\->\H
:\@\+1\->\\@\
:Else
:If A](G,H-2)=1:Then
:3\->\A](G,H-2):G\->\A:H-2\->\B
:\(-)\6A+67-P\->\J
:5(B-1)+N\->\I
:For(Z,I,I+4
:Line(Z,J,Z,J-5,0
:End
:prgmZZBOX
:1\->\A](G,H-1):G\->\A:H-1\->\B
:\(-)\6A+67-P\->\J
:5(B-1)+N\->\I
:For(Z,I,I+4
:Line(Z,J,Z,J-5,0
:End
:prgmZZBOX
:H-1\->\H
:End
:End
:End
:End
:End
:End
:End
:If K=25 and G\>=\2:Then
:If A](G-1,H)\<=\1:Then
:G-1\->\G
:Else
:If A](G-1,H)\<=\3 and G\>=\3:Then
:If A](G-1,H)=2:Then
:If A](G-2,H)\<=\0:Then
:2\->\A](G-2,H):G-2\->\A:H\->\B
:\(-)\6A+67-P\->\J
:5(B-1)+N\->\I
:For(Z,I,I+4
:Line(Z,J,Z,J-5,0
:End
:prgmZZBOX
:0\->\A](G-1,H):G-1\->\A:H\->\B
:prgmZZBOX
:G-1\->\G
:Else
:If A](G-2,H)=1:Then
:3\->\A](G-2,H):G-2\->\A:H\->\B
:\(-)\6A+67-P\->\J
:5(B-1)+N\->\I
:For(Z,I,I+4
:Line(Z,J,Z,J-5,0
:End
:prgmZZBOX
:0\->\A](G-1,H):G-1\->\A:H\->\B
:prgmZZBOX
:G-1\->\G
:\@\-1\->\\@\
:End
:End
:Else
:If A](G-1,H)=3:Then
:If A](G-2,H)\<=\0:Then
:2\->\A](G-2,H):G-2\->\A:H\->\B
:\(-)\6A+67-P\->\J
:5(B-1)+N\->\I
:For(Z,I,I+4
:Line(Z,J,Z,J-5,0
:End
:prgmZZBOX
:1\->\A](G-1,H):G-1\->\A:H\->\B
:\(-)\6A+67-P\->\J
:5(B-1)+N\->\I
:For(Z,I,I+4
:Line(Z,J,Z,J-5,0
:End
:prgmZZBOX
:G-1\->\G
:\@\+1\->\\@\
:Else
:If A](G-2,H)=1:Then
:3\->\A](G-2,H):G-2\->\A:H\->\B
:\(-)\6A+67-P\->\J
:5(B-1)+N\->\I
:For(Z,I,I+4
:Line(Z,J,Z,J-5,0
:End
:prgmZZBOX
:1\->\A](G-1,H):G-1\->\A:H\->\B
:\(-)\6A+67-P\->\J
:5(B-1)+N\->\I
:For(Z,I,I+4
:Line(Z,J,Z,J-5,0
:End
:prgmZZBOX
:G-1\->\G
:End
:End
:End
:End
:End
:End
:End
:If K=26 and H\<=\C-1
:Then
:If A](G,H+1)\<=\1:Then
:H+1\->\H
:Else
:If A](G,H+1)\<=\3 and H\<=\C-2:Then
:If A](G,H+1)=2:Then
:If A](G,H+2)\<=\0:Then
:2\->\A](G,H+2):G\->\A:H+2\->\B
:\(-)\6A+67-P\->\J
:5(B-1)+N\->\I
:For(Z,I,I+4
:Line(Z,J,Z,J-5,0
:End
:prgmZZBOX
:0\->\A](G,H+1):G\->\A:H+1\->\B
:prgmZZBOX
:H+1\->\H
:Else
:If A](G,H+2)=1:Then
:3\->\A](G,H+2):G\->\A:H+2\->\B
:\(-)\6A+67-P\->\J
:5(B-1)+N\->\I
:For(Z,I,I+4
:Line(Z,J,Z,J-5,0
:End
:prgmZZBOX
:0\->\A](G,H+1):G\->\A:H+1\->\B
:prgmZZBOX
:H+1\->\H
:\@\-1\->\\@\
:End
:End
:Else
:If A](G,H+1)=3:Then
:If A](G,H+2)\<=\0:Then
:2\->\A](G,H+2):G\->\A:H+2\->\B
:\(-)\6A+67-P\->\J
:5(B-1)+N\->\I
:For(Z,I,I+4
:Line(Z,J,Z,J-5,0
:End
:prgmZZBOX
:1\->\A](G,H+1):G\->\A:H+1\->\B
:\(-)\6A+67-P\->\J
:5(B-1)+N\->\I
:For(Z,I,I+4
:Line(Z,J,Z,J-5,0
:End
:prgmZZBOX
:H+1\->\H
:\@\+1\->\\@\
:Else
:If A](G,H+2)=1:Then
:3\->\A](G,H+2):G\->\A:H+2\->\B
:\(-)\6A+67-P\->\J
:5(B-1)+N\->\I
:For(Z,I,I+4
:Line(Z,J,Z,J-5,0
:End
:prgmZZBOX
:1\->\A](G,H+1):G\->\A:H+1\->\B
:\(-)\6A+67-P\->\J
:5(B-1)+N\->\I
:For(Z,I,I+4
:Line(Z,J,Z,J-5,0
:End
:prgmZZBOX
:H+1\->\H
:End
:End
:End
:End
:End
:End
:End
:If K=34 and G\<=\R-1:Then
:If A](G+1,H)\<=\1:Then
:G+1\->\G
:Else
:If A](G+1,H)\<=\3 and G\<=\R-2:Then
:If A](G+1,H)=2:Then
:If A](G+2,H)\<=\0:Then
:2\->\A](G+2,H):G+2\->\A:H\->\B
:\(-)\6A+67-P\->\J
:5(B-1)+N\->\I
:For(Z,I,I+4
:Line(Z,J,Z,J-5,0
:End
:prgmZZBOX
:0\->\A](G+1,H):G+1\->\A:H\->\B
:prgmZZBOX
:G+1\->\G
:Else
:If A](G+2,H)=1:Then
:3\->\A](G+2,H):G+2\->\A:H\->\B
:\(-)\6A+67-P\->\J
:5(B-1)+N\->\I
:For(Z,I,I+4
:Line(Z,J,Z,J-5,0
:End
:prgmZZBOX
:0\->\A](G+1,H):G+1\->\A:H\->\B
:prgmZZBOX
:G+1\->\G
:\@\-1\->\\@\
:End
:End
:Else
:If A](G+1,H)=3:Then
:If A](G+2,H)\<=\0:Then
:2\->\A](G+2,H):G+2\->\A:H\->\B
:\(-)\6A+67-P\->\J
:5(B-1)+N\->\I
:For(Z,I,I+4
:Line(Z,J,Z,J-5,0
:End
:prgmZZBOX
:1\->\A](G+1,H):G+1\->\A:H\->\B
:\(-)\6A+67-P\->\J
:5(B-1)+N\->\I
:For(Z,I,I+4
:Line(Z,J,Z,J-5,0
:End
:prgmZZBOX
:G+1\->\G
:\@\+1\->\\@\
:Else
:If A](G+2,H)=1:Then
:3\->\A](G+2,H):G+2\->\A:H\->\B
:\(-)\6A+67-P\->\J
:5(B-1)+N\->\I
:For(Z,I,I+4
:Line(Z,J,Z,J-5,0
:End
:prgmZZBOX
:1\->\A](G+1,H):G+1\->\A:H\->\B
:\(-)\6A+67-P\->\J
:5(B-1)+N\->\I
:For(Z,I,I+4
:Line(Z,J,Z,J-5,0
:End
:prgmZZBOX
:G+1\->\G
:End
:End
:End
:End
:End
:End
:End
:Lbl C
:If A](U,V)\<=\1:Then
:\(-)\6U+67-P\->\B
:5(V-1)+N\->\A
:For(Z,A,A+4
:Line(Z,B,Z,B-5,0
:End
:U\->\A:V\->\B
:prgmZZBOX
:End
:If \@\=0:Then
:Text(1,1,"YOU WON!!!"
:Goto \@\
:End
:Goto B
:Lbl \@\
:RecallGDB GDB6
:ClrHome
\STOP82\

\START82\
\NAME=EDITWRLD
:StoreGDB GDB6:FnOff :GridOff:AxesOff:PlotsOff :ClrDraw:FullScreen:0\ >\\#\
Xmin:94\->\Xmax:0\->\Ymin:62\->\Ymax:Normal:getKey:ClrHome
:Output(2,4,"BOXWORLD"
:Output(3,3,"EDITOR 1.0"
:Output(5,2,"BY SAM DAVIES"
:Pause 
:ClrHome
:Lbl \@\
:0\->\M
:Menu("BOX LEVEL EDITOR","CREATE NEW",A,"EDIT EXISTING",B,"RUN EXISTING\#\
",C,"HOW TO COMPILE",G,"QUIT",0)
:Lbl A
:{4,2}\->\dim A]
:Fill(0,A])
:1\->\R:2\->\C
:0\->\P:0\->\N
:1\->\G:1\->\H
:0\->\\@\
:Goto E
:Lbl B
:Menu("SELECT LEVEL","B]",1,"C]",2,"D]",3,"E]",4,"CANCEL",\@\)
:Lbl 1:B]\->\A]
:Goto D
:Lbl 2:C]\->\A]
:Goto D
:Lbl 3:D]\->\A]
:Goto D
:Lbl 4:E]\->\A]
:Goto D
:Lbl D
:dim A]\->\\L6\
:\L6\(1)-3\->\R:\L6\(2)\->\C
:A](R+1,1)\->\N
:A](R+1,2)\->\P
:A](R+2,1)\->\G
:A](R+2,2)\->\H
:A](R+3,1)\->\\@\
:1\->\dim \L6\
:ClrDraw
:For(A,1,R
:For(B,1,C
:prgmZZBOX
:End:End
:Goto E
:Lbl E
:1\->\M
:Menu("EDIT LEVEL","RESIZE",L,"POSITION BOARD",H,"STARTING PLACE",I,"ED\#\
IT",J,"TEST",F,"SAVE",K,"RETURN TO MAIN",\@\)
:Lbl L
:Line(N-1,62-P,N+5C,62-P)
:Line(N+5C,62-P-1,N+5C,62-(P+6R)-1)
:Line(N+5C,62-(P+6R)-1,N,62-(P+6R)-1)
:Line(N-1,62-(P+6R)-1,N-1,62-P-1)
:Text(51,0,"MOVE CURSER TO DESIRED"
:Text(57,0,"LOWER RIGHT CORNER OF BOARD."
:0\->\K
:getKey
:5C+N\->\J:6R+P\->\I
:J-4\->\J
:I-4\->\I
:For(Z,I,I+5
:Pt-Change(J+4,62-Z
:End
:For(Z,J,J+3
:Pt-Change(Z,62-I-5
:End
:Repeat K=105
:getKey\->\K
:If K=24 and J>10 and J>N+10:Then
:For(Z,I,I+5
:Pt-Change(J+4,62-Z
:End
:For(Z,J,J+3
:Pt-Change(Z,62-I-5
:End
:J-5\->\J
:For(Z,I,I+5
:Pt-Change(J+4,62-Z
:End
:For(Z,J,J+3
:Pt-Change(Z,62-I-5
:End
:End
:If K=34 and I<56:Then
:For(Z,I,I+5
:Pt-Change(J+4,62-Z
:End
:For(Z,J,J+3
:Pt-Change(Z,62-I-5
:End
:I+6\->\I
:For(Z,I,I+5
:Pt-Change(J+4,62-Z
:End
:For(Z,J,J+3
:Pt-Change(Z,62-I-5
:End
:End
:If K=26 and J<89:Then
:For(Z,I,I+5
:Pt-Change(J+4,62-Z
:End
:For(Z,J,J+3
:Pt-Change(Z,62-I-5
:End
:J+5\->\J
:For(Z,I,I+5
:Pt-Change(J+4,62-Z
:End
:For(Z,J,J+3
:Pt-Change(Z,62-I-5
:End
:End
:If K=25 and I>6:Then
:For(Z,I,I+5
:Pt-Change(J+4,62-Z
:End
:For(Z,J,J+3
:Pt-Change(Z,62-I-5
:End
:I-6\->\I
:For(Z,I,I+5
:Pt-Change(J+4,62-Z
:End
:For(Z,J,J+3
:Pt-Change(Z,62-I-5
:End
:End
:End
:For(Z,1,C
:0\->\A](R+1,Z
:End
:For(Z,1,C
:0\->\A](R+2,Z
:End
:For(Z,1,C
:0\->\A](R+3,Z
:End
:(J-N+4)/5\->\C
:(I-P+4)/6\->\R
:{R+3,C}\->\dim A]
:N\->\A](R+1,1
:P\->\A](R+1,2
:G\->\A](R+2,1
:H\->\A](R+2,2
:\@\\->\A](R+3,1
:ClrDraw
:For(A,1,R
:For(B,1,C
:prgmZZBOX
:End:End
:Goto E
:Lbl H
:DispGraph
:Line(N-1,62-P,N+5C,62-P)
:Line(N+5C,62-P-1,N+5C,62-(P+6R)-1)
:Line(N+5C,62-(P+6R)-1,N,62-(P+6R)-1)
:Line(N-1,62-(P+6R)-1,N-1,62-P-1)
:Text(51,0,"MOVE CURSER TO DESIRED"
:Text(57,0,"UPPER LEFT CORNER OF BOARD."
:0\->\K
:getKey
:N-1\->\N
:For(Z,P,P+5
:Pt-Change(N,62-Z
:End
:For(Z,N+1,N+4)
:Pt-Change(Z,62-P
:End
:Repeat K=105
:getKey\->\K
:If K=24 and N\>=\0:Then
:For(Z,P,P+5
:Pt-Change(N,62-Z
:End
:For(Z,N+1,N+4)
:Pt-Change(Z,62-P
:End
:N-1\->\N
:For(Z,P,P+5
:Pt-Change(N,62-Z
:End
:For(Z,N+1,N+4)
:Pt-Change(Z,62-P
:End
:End
:If K=34 and P\<=\62:Then
:For(Z,P,P+5
:Pt-Change(N,62-Z
:End
:For(Z,N+1,N+4)
:Pt-Change(Z,62-P
:End
:P+1\->\P
:For(Z,P,P+5
:Pt-Change(N,62-Z
:End
:For(Z,N+1,N+4)
:Pt-Change(Z,62-P
:End
:End
:If K=26 and N\<=\94:Then
:For(Z,P,P+5
:Pt-Change(N,62-Z
:End
:For(Z,N+1,N+4)
:Pt-Change(Z,62-P
:End
:N+1\->\N
:For(Z,P,P+5
:Pt-Change(N,62-Z
:End
:For(Z,N+1,N+4)
:Pt-Change(Z,62-P
:End
:End
:If K=25 and P\>=\0:Then
:For(Z,P,P+5
:Pt-Change(N,62-Z
:End
:For(Z,N+1,N+4)
:Pt-Change(Z,62-P
:End
:P-1\->\P
:For(Z,P,P+5
:Pt-Change(N,62-Z
:End
:For(Z,N+1,N+4)
:Pt-Change(Z,62-P
:End
:End
:End
:N+1\->\N
:ClrDraw
:For(A,1,R)
:For(B,1,C)
:prgmZZBOX
:End:End
:N\->\A](R+1,1)
:P\->\A](R+1,2)
:Text(57,0,"PRESS ENTER..."
:Pause 
:Goto E
:Lbl I
:DispGraph
:Text(51,0,"MOVE MAN TO STARTING"
:Text(57,0,"PLACE."
:Line(N-1,62-P,N+5C,62-P)
:Line(N+5C,62-P-1,N+5C,62-(P+6R)-1)
:Line(N+5C,62-(P+6R)-1,N,62-(P+6R)-1)
:Line(N-1,62-(P+6R)-1,N-1,62-P-1)
:\(-)\6G+67-P\->\J
:5(H-1)+N\->\I
:For(Z,I,I+4
:Line(Z,J,Z,J-5,0
:End
:\(-)\6G+67-P\->\B:5(H-1)+N\->\A
:Pt-On(A+1,B
:Pt-On(A+2,B
:Pt-On(A+3,B
:Pt-On(A+1,B-1
:Pt-On(A+2,B-1
:Pt-On(A+3,B-1
:Pt-On(A+2,B-2
:Pt-On(A+1,B-3
:Pt-On(A+2,B-3
:Pt-On(A+3,B-3
:Pt-On(A+2,B-4
:Pt-On(A+1,B-5
:Pt-On(A+3,B-5
:0\->\K
:getKey
:Repeat K=105
:getKey\->\K
:If K=24 and H>1:Then
:\(-)\6G+67-P\->\J
:5(H-1)+N\->\I
:For(Z,I,I+4
:Line(Z,J,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-On(A+2,B-3
:Pt-On(A+3,B-3
:Pt-On(A+2,B-4
:Pt-On(A+1,B-5
:Pt-On(A+3,B-5
:End
:If K=34 and G\J
:5(H-1)+N\->\I
:For(Z,I,I+4
:Line(Z,J,Z,J-5,0
:End
:G\->\A:H\->\B:prgmZZBOX
:G+1\->\G
:\(-)\6G+67-P\->\J
:5(H-1)+N\->\I
:For(Z,I,I+4
:Line(Z,J,Z,J-5,0
:End
:\(-)\6G+67-P\->\B:5(H-1)+N\->\A
:Pt-On(A+1,B
:Pt-On(A+2,B
:Pt-On(A+3,B
:Pt-On(A+1,B-1
:Pt-On(A+2,B-1
:Pt-On(A+3,B-1
:Pt-On(A+2,B-2
:Pt-On(A+1,B-3
:Pt-On(A+2,B-3
:Pt-On(A+3,B-3
:Pt-On(A+2,B-4
:Pt-On(A+1,B-5
:Pt-On(A+3,B-5
:End
:End
:G\->\A](R+2,1
:H\->\A](R+2,2
:ClrDraw
:For(A,1,R
:For(B,1,C
:prgmZZBOX
:End:End
:Goto E
:Lbl K
:Menu("SAVE AS","B]",N,"C]",O,"D]",P,"E]",Q,"CANCEL",E
:Lbl N
:A]\->\B]:Goto E
:Lbl O
:A]\->\C]:Goto E
:Lbl P
:A]\->\D]:Goto E
:Lbl Q
:A]\->\E]:Goto E
:Lbl J
:Line(N-1,62-P,N+5C,62-P)
:Line(N+5C,62-P-1,N+5C,62-(P+6R)-1)
:Line(N+5C,62-(P+6R)-1,N,62-(P+6R)-1)
:Line(N-1,62-(P+6R)-1,N-1,62-P-1)
:N+1\->\J
:P+2\->\I
:For(Z,I,I+5
:Pt-Change(J+4,62-Z
:End
:For(Z,J,J+3
:Pt-Change(Z,62-I-5
:End
:0\->\K:getKey
:Repeat K=22
:getKey\->\K
:If K=24 and J\>=\N+5:Then
:For(Z,I,I+5
:Pt-Change(J+4,62-Z
:End
:For(Z,J,J+3
:Pt-Change(Z,62-I-5
:End
:J-5\->\J
:For(Z,I,I+5
:Pt-Change(J+4,62-Z
:End
:For(Z,J,J+3
:Pt-Change(Z,62-I-5
:End
:End
:If K=34 and (I-P+4)/6\I
:For(Z,I,I+5
:Pt-Change(J+4,62-Z
:End
:For(Z,J,J+3
:Pt-Change(Z,62-I-5
:End
:End
:If K=26 and (J-N+4)/5\J
:For(Z,I,I+5
:Pt-Change(J+4,62-Z
:End
:For(Z,J,J+3
:Pt-Change(Z,62-I-5
:End
:End
:If K=25 and I\>=\P+6:Then
:For(Z,I,I+5
:Pt-Change(J+4,62-Z
:End
:For(Z,J,J+3
:Pt-Change(Z,62-I-5
:End
:I-6\->\I
:For(Z,I,I+5
:Pt-Change(J+4,62-Z
:End
:For(Z,J,J+3
:Pt-Change(Z,62-I-5
:End
:End
:If K=11:Then
:(I-P+4)/6\->\A
:(J-N+4)/5\->\B
:If A](A,B)=1:\@\-1\->\\@\
:0\->\A](A,B)
:\(-)\6A+67-P\->\U
:5(B-1)+N\->\V
:For(Z,V,V+4
:Line(Z,U,Z,U-5,0
:End
:prgmZZBOX
:End
:If K=12:Then
:(I-P+4)/6\->\A
:(J-N+4)/5\->\B
:If A](A,B)\<>\1:\@\+1\->\\@\
:1\->\A](A,B)
:\(-)\6A+67-P\->\U
:5(B-1)+N\->\V
:For(Z,V,V+4
:Line(Z,U,Z,U-5,0
:End
:prgmZZBOX
:End
:If K=13:Then
:(I-P+4)/6\->\A
:(J-N+4)/5\->\B
:If A](A,B)=1:\@\-1\->\\@\
:2\->\A](A,B)
:\(-)\6A+67-P\->\U
:5(B-1)+N\->\V
:For(Z,V,V+4
:Line(Z,U,Z,U-5,0
:End
:prgmZZBOX
:End
:If K=14:Then
:(I-P+4)/6\->\A
:(J-N+4)/5\->\B
:If A](A,B)=1:\@\-1\->\\@\
:3\->\A](A,B)
:\(-)\6A+67-P\->\U
:5(B-1)+N\->\V
:For(Z,V,V+4
:Line(Z,U,Z,U-5,0
:End
:prgmZZBOX
:End
:If K=15:Then
:(I-P+4)/6\->\A
:(J-N+4)/5\->\B
:4\->\A](A,B)
:\(-)\6A+67-P\->\U
:5(B-1)+N\->\V
:For(Z,V,V+4
:Line(Z,U,Z,U-5,0
:End
:prgmZZBOX
:End
:End
:\@\\->\A](R+3,1)
:For(Z,I,I+5
:Pt-Change(J+4,62-Z
:End
:For(Z,J,J+3
:Pt-Change(Z,62-I-5
:End
:Goto E
:Lbl C
:Menu("RUN LEVEL:","B]",5,"C]",6,"D]",7,"E]",8,"RETURN TO MAIN",\@\)
:Lbl 5:B]\->\A]
:Goto F
:Lbl 6:C]\->\A]
:Goto F
:Lbl 7:D]\->\A]
:Goto F
:Lbl 8:E]\->\A]
:Goto F
:Lbl F
:prgmBOXWORLD
:If M=1:Then
:For(A,1,R
:For(B,1,C
:prgmZZBOX
:End:End
:Goto E
:End
:Goto \@\
:Lbl G
:ClrDraw
:Text(1,1,"TO COMPILE YOUR OWN
:Text(7,1,"BOXWORLD COLLECTION:"
:Text(15,1,"1:CREATE A NEW PROGRAM"
:Text(21,1,"2:RECALL YOUR HOMEMADE"
:Text(27,1,"LEVEL INTO YOUR PROGRAM"
:Text(33,1,"PRESS: [2nd][RCL], THEN"
:Text(39,1,"ENTER THE NAME OF THE"
:Text(45,1,"MATRIX. THEN ADD '->A]'"
:Text(51,1,"AT THE END, AND ON THE NEXT"
:Text(57,1,"(PRESS ENTER...)"
:Pause 
:ClrDraw
:Text(1,1,"LINE PUT:prgmBOXWORLD"
:Text(7,1,"3:RECALL ALL OF YOUR"
:Text(13,1,"LEVELS INTO THE PROGRAM,"
:Text(19,1,"AND ADD A CHOOSING METHOD"
:Text(25,1,"SUCH AS 'Menu(' TO YOUR"
:Text(31,1,"PROGRAM."
:Text(37,1,"4:FINALLY, ADD A TITLE"
:Text(43,1,"SCREEN, AND GIVE IT TO"
:Text(49,1,"EVERYONE!!! :)"
:Text(57,1,"(PRESS ENTER...)"
:Pause 
:ClrDraw
:Goto \@\
:Lbl 0
:ClrHome
:RecallGDB GDB6
\STOP82\

\START82\
\NAME=LEVEL
:ClrHome
:Output(3,2,"THE ORIGINAL"
:Output(4,1,"BOXWORLD LEVELS"
:Output(5,7,"BY"
:Output(6,1,"JENG-LONG JIANG"
:Pause 
:ClrHome
:Lbl \@\
:Menu("BOXWORLD","LEVEL 1",1,"LEVEL 2",2,"LEVEL 3",3,"LEVEL 4",4,"LEVEL\#\
 5",5,"LEVEL 6",6,"MORE",Z
:Lbl Z
:Menu("BOXWORLD","LEVEL 7",7,"LEVEL 8",8,"LEVEL 9",9,"LEVEL 10",A,"LEVE\#\
L 11",B,"LEVEL 12",C,"MORE",Y
:Lbl Y
:Menu("BOXWORLD","LEVEL 13",D,"LEVEL 14",E,"LEVEL 15",F,"LEVEL 16",G,"L\#\
EVEL 17",H,"LEVEL 18",I,"MORE",X
:Lbl X
:Menu("BOXWORLD","LEVEL 19",J,"LEVEL 20",K,"LEVEL 21",L,"LEVEL 22",M,"L\#\
EVEL 25",N,"QUIT",0
:Lbl 1
:[[0,0,4,4,4,0,0,0][0,0,4,1,4,0,0,0][0,0,4,0,4,4,4,4][4,4,4,2,0,2,1,4][\#\
4,1,0,2,0,4,4,4][4,4,4,4,2,4,0,0][0,0,0,4,1,4,0,0][0,0,0,4,4,4,0,0][0,0\#\
,0,0,0,0,0,0][5,5,0,0,0,0,0,0][4,0,0,0,0,0,0,0]]\->\A]
:prgmBOXWORLD
:Goto \@\
:Lbl 2
:[[4,4,4,4,4,0,0,0,0][4,0,0,0,4,0,0,0,0][4,0,2,2,4,0,4,4,4][4,0,2,0,4,0\#\
,4,1,4][4,4,4,0,4,4,4,1,4][0,4,4,0,0,0,0,1,4][0,4,0,0,0,4,0,0,4][0,4,0,\#\
0,0,4,4,4,4][0,4,4,4,4,4,0,0,0][0,0,0,0,0,0,0,0,0][2,2,0,0,0,0,0,0,0][3\#\
,0,0,0,0,0,0,0,0]]\->\A]
:prgmBOXWORLD
:Goto \@\
:Lbl 3
:[[0,4,4,4,4,4,4,4,0,0][0,4,0,0,0,0,0,4,4,4][4,4,2,4,4,4,0,0,0,4][4,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,0,0,0]]\->\A]
:prgmBOXWORLD
:Goto \@\
\STOP82\

\START82\
\NAME=ZZBOX
:5(B-1)+N\->\D:\(-)\6A+62-P\->\E
:If A](A,B)<1:Then
:For(Z,D,D+4)
:Line(Z,E,Z,E+5,0
:End
:Return
:End
:If A](A,B)=1 or A](A,B)=3
:Then
:Line(D+1,E+2,D+3,E+4
:Line(D+1,E+4,D+3,E+2
:End
:If A](A,B)\>=\2
:Then
:Line(D,E,D,E+5
:Line(D,E+5,D+4,E+5
:Line(D+4,E+5,D+4,E
:Line(D+4,E,D,E
:End
:If A](A,B)=4
:Then
:Line(D+2,E+1,D+2,E+4)
:Pt-On(D+1,E+3
:Pt-On(D+3,E+3
:End
:Return
\STOP82\

© 1997 bckcoats@ix.netcom.com


This page hosted by GeoCities Get your own Free Home Page


1