class Player
@health = 0
def play_turn(warrior)
@health = warrior.health
if(warrior.feel.empty?)
if(warrior.health < 15 && (@health < warrior.health))
warrior.rest!
@health = warrior.health
else
warrior.walk!
@health = warrior.health
end
else
warrior.attack!
end
end
end
为什么杀了那个弓箭手后不原地执行加血啊,哪里出问题了。。 https://www.bloc.io/ruby-warrior/#/warriors/51156/levels/4 传送门