CodeMonkey过关学习笔记系列:120-128关

CodeMonkey过关学习笔记系列:120-128关

image137.jpeg

120 关挑战
until tiger.sleeping()
    wait()
goto banana


image138.jpeg

121 关挑战
until bear.sleeping()
    wait()
goto banana


image139.jpeg

122 关挑战

for b in bananas
    until bear.sleeping()
        wait() //#等待,什么?
    goto b

image140.jpeg

123 关挑战

until bear.sleeping() and tiger.sleeping()
    wait()
goto banana

image141.jpeg

124 关挑战

until bear.sleeping() and tiger.sleeping()
    wait()
goto banana

image142.jpeg

125 关挑战

until bear.sleeping() and tiger.sleeping() //#并且...
    wait()

for b in bananas
    goto b

image143.jpeg

126 关挑战

for b in bananas
    until bear.sleeping() and tiger.sleeping() //#并且...
        wait()
    if b.green()
        goat.goto b
    monkey.goto b

image144.jpeg

127 关挑战

waitForSafety = () ->
    until bear.sleeping() and tiger.sleeping()
        wait()

for b in bananas
    waitForSafety()
    goto b

image145.jpeg

128 关挑战

for b in bananas
    until bear.sleeping() and tiger.sleeping()
            wait()
    if b.frozen()
        goat.goto b
        goat.hit()
    until bear.sleeping() and tiger.sleeping()
            wait()
    monkey.goto b


猜你喜欢

转载自blog.csdn.net/mmh19891113/article/details/80758595