Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def attack! player
- puts "#{self.name} attacks #{player.name}!"
- puts ""
- until self.hp <= 0 || player.hp <= 0
- self.hit player
- player.hit self
- end
- if self.hp > 0
- winner = self.name
- else
- winner = player.name
- end
- puts ""
- puts "The skies clear and the birds chirp as #{winner} wins!"
- end
Add Comment
Please, Sign In to add comment