Created
May 7, 2014 00:13
-
-
Save kevinnio/4f8b4117874c15455f43 to your computer and use it in GitHub Desktop.
Código del nivel 3, modo Beginner de RubyWarrior
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Player | |
def play_turn(warrior) | |
if warrior.feel.empty? | |
warrior.health < 20 ? warrior.rest! : warrior.walk! | |
else | |
warrior.attack! | |
end | |
end | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment