SHOW:
|
|
- or go back to the newest paste.
| 1 | local t = turtle | |
| 2 | ||
| 3 | local function forward(x) | |
| 4 | for i = 1, x do | |
| 5 | t.forward() | |
| 6 | end | |
| 7 | end | |
| 8 | ||
| 9 | local function rTurn(x) | |
| 10 | for i = 1, x do | |
| 11 | t.turnRight() | |
| 12 | end | |
| 13 | end | |
| 14 | ||
| 15 | local function lTurn(x) | |
| 16 | for i = 1, x do | |
| 17 | t.turnLeft() | |
| 18 | end | |
| 19 | end | |
| 20 | ||
| 21 | local function up(x) | |
| 22 | for i = 1, x do | |
| 23 | t.up() | |
| 24 | end | |
| 25 | end | |
| 26 | ||
| 27 | local function down(x) | |
| 28 | - | for i - 1, x do |
| 28 | + | |
| 29 | t.down() | |
| 30 | end | |
| 31 | end | |
| 32 | ||
| 33 | local function back(x) | |
| 34 | - | for i -1, x do |
| 34 | + | |
| 35 | t.back() | |
| 36 | end | |
| 37 | end |