Skip to content

Instantly share code, notes, and snippets.

@kevinnio
Created May 7, 2014 00:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kevinnio/4f8b4117874c15455f43 to your computer and use it in GitHub Desktop.
Save kevinnio/4f8b4117874c15455f43 to your computer and use it in GitHub Desktop.
Código del nivel 3, modo Beginner de RubyWarrior
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