Module: GameLogic

Defined in:
lib/text_game/game_logic.rb

Class Method Summary collapse

Class Method Details

.check(player) ⇒ Object



2
3
4
5
6
7
8
9
10
11
12
13
# File 'lib/text_game/game_logic.rb', line 2

def self.check player
	@die = Die.new
	number_rolled = @die.roll
	case number_rolled
	when 5..6
		player.woot
	when 3..4
		puts "#{player.name} was skipped."
	else
		player.blam
	end
end