Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local tickNumber=0
- while true do
- tickNumber=tickNumber+1
- print("AI:Tick--------------#"..tickNumber)
- refuel(test)
- local res=test:go(world)
- if res=="out of fuel" then printError("Out of fuel") break end
- if res==true then
- print("AI:Updating position to")
- print(serialize(test.pos))
- printError("Updated fuel level:"..test.fuel)
- elseif res=="can't reach destination" then
- test:turnLeft()
- print("AI:Updating rotation to")
- print(test.rot)
- else
- printError("unknown")
- break
- end
- updateUI()
- end
Advertisement
Add Comment
Please, Sign In to add comment