Advertisement
Guest User

Untitled

a guest
Dec 20th, 2013
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. class Player
  2. @health = 0
  3. def play_turn(warrior)
  4. if @health > warrior.health
  5. if warrior.feel.empty?
  6. if warrior.health < 20
  7. warrior.rest!
  8. else
  9. warrior.walk!
  10.  
  11. end
  12. else
  13. warrior.attack!
  14. end
  15. else
  16. warrior.attack!
  17. end
  18. @health = warrior.health
  19.  
  20. end
  21. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement