Module: TreasureHunt::Playable

Included in:
Player
Defined in:
lib/treasure_game/playable.rb

Instance Method Summary collapse

Instance Method Details

#healObject



7
8
9
# File 'lib/treasure_game/playable.rb', line 7

def heal
  self.health += 15
end

#hitObject



3
4
5
# File 'lib/treasure_game/playable.rb', line 3

def hit
  self.health -= 10
end

#strong?Boolean

Returns:

  • (Boolean)


11
12
13
14
15
16
17
# File 'lib/treasure_game/playable.rb', line 11

def strong?
  if self.health > 100
    true
  else
    false
  end
end