Module: GameTurn

Defined in:
lib/jj-studio_game/gameturn.rb

Class Method Summary collapse

Class Method Details

.take_turn(player) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/jj-studio_game/gameturn.rb', line 6

def self.take_turn(player)
    number_rolled = StudioGame::Die.new
    number_rolled.roll
    case number_rolled
    when 1..2
        player.blam
    when 3..4
        puts "#{player.name} was skipped."
    else
        player.w00t
    end
    treasure = StudioGame::TreasureChest.random
    player.found_treasure(treasure)
    puts player
end