Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- x,y = term.getSize
- tempx = math.random(0,x)
- tempy = math.random(0,y)
- posx = tempx
- posy = tempy
- function renderMan()
- term.setCursorPos(posx,posy)
- print ("0")
- print ("|")
- end
- function randomMove()
- dirx = math.random(-1,1)
- diry = math.random(-1,1)
- posx = dirx
- posy = diry
- end
- function willIMove()
- decision = math.random(0,5)
- if decision ~= 0 then
- decision = decision - 1
- decision = decision / 4
- sleep (decision)
- randomMove()
- end
- end
- while true do
- renderMan()
- willIMove()
- end
Advertisement
Add Comment
Please, Sign In to add comment