Skip to content

Instantly share code, notes, and snippets.

@jansanchez
Created August 8, 2013 08:08
Show Gist options
  • Save jansanchez/6182598 to your computer and use it in GitHub Desktop.
Save jansanchez/6182598 to your computer and use it in GitHub Desktop.
Ruby Warrior - Level 8
# ruby warrior level 8
#
class Player
def play_turn(warrior)
@health = warrior.health
if warrior.feel.captive?
warrior.rescue!
@shooter = true
else
if warrior.look[1].enemy?
warrior.shoot!
else
warrior.walk!
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment