Module: StudioGame::GameTurn

Defined in:
lib/studio_game/game_turn.rb

Class Method Summary collapse

Class Method Details

.take_turn(player) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/studio_game/game_turn.rb', line 8

def self.take_turn(player)
        die = Die.new
        case die.roll
        when 3..4
            puts "Player: #{player.name.capitalize} was skipped"
        when 1..2
            player.blam
            puts player
        when 5..6
            player.woot
            puts player
        end
    treasure = TreasureTrove.random
    player.found_treasure(treasure)
    
end