Skip to content

Instantly share code, notes, and snippets.

View jansanchez's full-sized avatar

Jan Sanchez jansanchez

View GitHub Profile
@jansanchez
jansanchez / gist:6145636
Last active December 20, 2015 14:19
Ruby Warrior - Level 3
# ruby warrior level 3
#
class Player
def play_turn(warrior)
if @needCure == nil
if warrior.health < 18
warrior.walk! :backward
@needCure = true
else
if warrior.feel.empty?