Module: Playable

Included in:
TextGame::Player
Defined in:
lib/text_game/playable.rb

Instance Method Summary collapse

Instance Method Details

#<=>(other) ⇒ Object



6
7
8
# File 'lib/text_game/playable.rb', line 6

def <=> other
	other.score <=> score
end

#blamObject



10
11
12
13
# File 'lib/text_game/playable.rb', line 10

def blam
	self.health-=10
	puts "#{self.name} got blammed!"
end

#strong?Boolean

Returns:

  • (Boolean)


2
3
4
# File 'lib/text_game/playable.rb', line 2

def strong?
	self.health >= 100
end

#wootObject



15
16
17
18
# File 'lib/text_game/playable.rb', line 15

def woot
	self.health+=15
	puts "#{self.name} got wooted!"
end