Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ClrHome
- For(F,1,40)
- For(G,1,40)
- 0→[J](F,G)
- End
- End
- 12→N
- seq(0,I,1,N)→L₁
- seq(0,I,1,N)→L₂
- seq(0,I,1,N)→L₃
- seq(0,I,1,N)→L₄
- " .#"→Str1
- For(R,1,N)
- Lbl A
- randInt(4,8)→A
- randInt(4,8)→B
- randInt(2,40-A-1)→C
- randInt(2,40-B-1)→D
- 0→E
- For(S,D-1,D+B)
- For(T,C-1,C+A)
- If S≥1 and S≤40 and T≥1 and T≤40 and [J](S,T)≠0:1→E
- End
- End
- If E=1:Goto A
- C+int(A/2)→L₃(R)
- D+int(B/2)→L₄(R)
- For(S,D,D+B-1)
- For(T,C,C+A-1)
- 1→[J](S,T)
- End
- End
- End
- For(R,2,N)
- L₃(R-1)→E
- L₄(R-1)→F
- L₃(R)→G
- L₄(R)→H
- randInt(0,1)→Z
- If Z=0
- Then
- For(W,min(E,G),max(E,G))
- 2→[J](F,W)
- End
- For(W,min(F,H),max(F,H))
- 2→[J](W,G)
- End
- End
- If Z=1
- Then
- For(W,min(F,H),max(F,H))
- 2→[J](W,E)
- End
- For(W,min(E,G),max(E,G))
- 2→[J](H,W)
- End
- End
- End
- L₃(1)→O
- L₄(1)→M
- Lbl B
- O>8:O-7→U
- If O≤8:1→U
- If U>25:25→U
- M>4:M-3→V
- If M≤4:1→V
- If V>33:33→V
- ClrDraw
- AxesOff
- DispGraph
- For(F,V,V+7)
- For(G,U,U+15)
- If F≥1 and F≤40 and G≥1 and G≤40
- Then
- If F=M and G=O
- Then
- Text((F-V)*8,(G-U)*6,"@")
- Else
- [J](F,G)→C
- Text((F-V)*8,(G-U)*6,sub(Str1,1+C,1))
- End
- End
- End
- End
- Repeat K
- getKey→K
- End
- If K=24 and O>1 and [J](M,O-1)≠0:O-1→O
- If K=26 and O<40 and [J](M,O+1)≠0:O+1→O
- If K=25 and M>1 and [J](M-1,O)≠0:M-1→M
- If K=34 and M<40 and [J](M+1,O)≠0:M+1→M
- Goto B
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement