Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function postaw(x) --funkcja do stawiania pod robotem
- turtle.select(x)
- turtle.digDown()
- turtle.placeDown()
- end
- function scieszka(a,z) --ruch po prostej i stawianie ponizej
- while(a>0)
- do
- if(z<17)
- then
- while ((turtle.getItemCount(z))==0)
- do
- z=z+1
- end
- postaw(z)
- end
- np()
- a=a-1
- end
- end
- function np()
- while(turtle.forward()==false) --funkcja na przud z sprawdzaniem mozliwosci przejscia
- do
- turtle.dig()
- end
- end
- function up()
- while(turtle.up()==false)
- do
- turtle.digUP()
- end
- end
- function kwadrat(x)
- z=4
- a=1
- while(z>0)
- do
- scieszka(x,a)
- turtle.turnRight()
- z=z-1
- end
- end
- x=17 --dlugosc i szerokosc piramidy
- up()
- kwadrat(x)
- up()
- while (x>1)
- do
- kwadrat(x)
- x=x-2
- np()
- turtle.turnRight()
- np()
- turtle.turnLeft()
- up()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement