Skip to content

Instantly share code, notes, and snippets.

@a1ip
Created June 17, 2014 19:53
Show Gist options
  • Select an option

  • Save a1ip/56bf195d45b5d99aaed1 to your computer and use it in GitHub Desktop.

Select an option

Save a1ip/56bf195d45b5d99aaed1 to your computer and use it in GitHub Desktop.
Ruby warrior solution beginner level 3

Level Score: 48
Time Bonus: 9
Clear Bonus: 11
Total Score: 36 + 68 = 104

class Player
def play_turn(warrior)
if warrior.feel.empty?
if warrior.health < 7
warrior.rest!
else
warrior.walk!
end
else
warrior.attack!
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment