Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- term.clear()
- term.setCursorPos(1,1)
- x = 0
- y = 0
- function rd()
- x, y = x + 1, y + 1
- sleep(0.1)
- term.setCursorPos(x,y)
- write("O")
- end
- function ru()
- x, y = x + 1, y - 1
- sleep(0.1)
- term.setCursorPos(x,y)
- write("O")
- end
- function ld()
- x, y = x - 1, y + 1
- sleep(0.1)
- term.setCursorPos(x,y)
- write("O")
- end
- function lu()
- x, y = x - 1, y - 1
- sleep(0.1)
- term.setCursorPos(x,y)
- write("O")
- end
- while true do
- repeat
- if y == 18 then
- repeat
- rd()
- until y == 1 or x == 50
- end
- if y == 1 then
- repeat
- ru()
- until y == 18 or x == 50
- end
- until x == 50
- repeat
- if y < 18 then
- repeat
- ld()
- until y == 1 or x == 1
- end
- if y > 1 then
- repeat
- lu()
- until y == 18 or x == 1
- end
- until x == 1
- end
Advertisement
Add Comment
Please, Sign In to add comment