SHOW:
|
|
- or go back to the newest paste.
1 | - | red=0 |
1 | + | --Make two variables for your two colors |
2 | - | green=0 |
2 | + | |
3 | - | for i=1, 10 do |
3 | + | for i=1, 10 do --go 10 times |
4 | - | if turtle.compareDown()== true then |
4 | + | if turtle.compareDown()== true then |
5 | - | red=red+1 |
5 | + | --If the block below matches the block in your inventory add one to that variable |
6 | ||
7 | - | green= green+1 |
7 | + | |
8 | -- if it doesn't match the block below add one to your second variable | |
9 | - | turtle.forward() |
9 | + | |
10 | end | |
11 | -- Go forward | |
12 | end | |
13 | ||
14 | --replace Red and Green with the names of your variables | |
15 | print("Red = "..red.. " Green = ".. green) |