This code prints “look is 0” two times, then counts up. I then get one more play than I expect. Shouldn’t look be a different value after every time you tick?
live_loop :testLoop do
puts "look is", look
if look < 5
play 60
sleep 1
else
sleep 1
end
tick
end
Note here, that in order to print 1 the first time we step through the ring items, tick has to return 0 the first time. Otherwise, if the first time it was called it returned 1, we would skip the first ring item.
The idea here to make it do what you want is to call tick before you call look