67
2015-08-31 18:19:38
0
Lv. 7
class Player
def play_turn(warrior)
if warrior.feel.wall?
warrior.pivot!
else
if warrior.health != 20
if warrior.health < @health
if warrior.health < 10
warrior.walk!(:backward)
else
if warrior.feel.empty?
warrior.walk!
else
warrior.attack!
end
end
else
warrior.rest!
end
else
warrior.walk!
end
end
@health = warrior.health
end
end
으으
코딩 모르는 일반인이 어거지로 깨봅니다...