Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Player
- @health = 0
- def play_turn(warrior)
- if @health > warrior.health
- if warrior.feel.empty?
- if warrior.health < 20
- warrior.rest!
- else
- warrior.walk!
- end
- else
- warrior.attack!
- end
- else
- warrior.attack!
- end
- @health = warrior.health
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement