Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- shell.run("clear")
- print ("@Version: 1_1_1a")
- print ("@author: Kevin Iselborn")
- sleep (2)
- width = 1
- length = 1
- function digAndForward()
- turtle.dig()
- turtle.forward()
- end
- function getInput ()
- shell.run("clear")
- print ("Wie viele Reihen sollen abgebaut werden?")
- width = read()
- while not tonumber(width) do
- print ("Du darfst nur Zahlen eingeben...Bitte versuche es erneut.")
- print ("Wie viele Reihen sollen abgebaut werden?")
- width = read()
- end
- shell.run("clear")
- print ("Wie Lang sind diese Reihen?")
- length = read()
- while not tonumber(length) do
- print ("Du darfst nur Zahlen eingeben...Bitte versuche es erneut.")
- print ("Wie Lang sind diese Reihen?")
- length = read()
- end
- shell.run("clear")
- end
- function mineRow ()
- i = 0
- while i<length do
- digAndForward()
- i=i+1
- end
- end
- function changeRow ()
- turtle.turnRight()
- turtle.turnRight()
- mineRow()
- turtle.turnLeft()
- digAndForward()
- turtle.turnLeft()
- end
- function mine ()
- k=0
- while k<width do
- mineRow()
- changeRow()
- k=k+1
- end
- end
- getInput()
- mine()
- print("finished")
Add Comment
Please, Sign In to add comment