Module: StudioGame::GameTurn

Defined in:
lib/studio_game/game_turn.rb

Class Method Summary collapse

Class Method Details

.take_turn(player) ⇒ Object



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

def self.take_turn(player)
   die = Die.new
   number_rolled = die.roll
   case number_rolled
   when 1..2
     player.blam
   when 3..4
     puts "#{player.name} was skipped"
   else
     player.woot
   end

   treasure = TreasureTrove.random
   player.found_treasure(treasure)
end