Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ClrHome
- Prompt D
- ClrHome
- {4,8→dim([A]
- {4,8→dim([B]
- Fill(0,[A]
- Fill(0,[B]
- 1→X
- 1→Y
- 1→S
- 1→T
- 0→G
- For(A,1,4
- For(B,1,8
- Output(1+(A-1)2,1+(B-1)2,0
- End
- End
- For(C,–D,0
- randInt(1,8→X
- randInt(1,4→Y
- If C
- Goto A
- While 1
- If Y≠T≠S
- Then
- Output(T2-1,S2,"
- Output(T2,S2-1,"
- End
- Output(Y2-1,X2,")
- Output(Y2,X2-1,"U
- getKey→A
- X→S
- Y→T
- If A=26
- X+1→X
- If A=24
- X-1→X
- If A=25
- Y-1→Y
- If A=34
- Y+1→Y
- If X=9
- 1→X
- If Y=5
- 1→Y
- If X=0
- 8→X
- If Y=0
- 4→Y
- If A=31
- Then
- not(G→G
- For(E,1,8
- For(F,1,4
- If [B](F,E) and G
- Then
- Output(F2,E2,":
- Else
- Output(F2,E2,"
- End
- End
- End
- End
- If A=21
- Then
- Lbl A
- not([B](Y,X→[B](Y,X)
- If G
- Then
- If [B](Y,X
- Then
- Output(Y2,X2,":
- Else
- Output(Y2,X2,"
- End
- End
- not([A](Y,X→B
- B→[A](Y,X
- Output(1+(Y-1)2,1+(X-1)2,B
- If X-1≥1
- Then
- not([A](Y,X-1→B
- B→[A](Y,X-1
- Output(1+(Y-1)2,1+(X-2)2,B
- End
- If X+1≤8
- Then
- not([A](Y,X+1→B
- B→[A](Y,X+1
- Output(1+(Y-1)2,1+X2,B
- End
- If Y-1≥1
- Then
- not([A](Y-1,X→B
- B→[A](Y-1,X
- Output(1+(Y-2)2,1+(X-1)2,B
- End
- If Y+1≤4
- Then
- not([A](Y+1,X→B
- B→[A](Y+1,X
- Output(1+Y2,1+(X-1)2,B
- End
- End
- End
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement