module GameTurn

Public Class Methods

take_turn(player) click to toggle source
# File lib/GamalielPelino/agam14_module.rb, line 9
def self.take_turn(player)
    die = GamalielPelino::Loaded_Die.new
    case die.roll
        when 1..2
            player.blam
        when 3..4
             puts "#{player.name} was skipped."
        else
            player.w00t
    end
    
    itemss = Item.random
    puts "#{player.name} found a #{itemss.item} worth #{itemss.points} points."
    puts player.found_piece(itemss)
    
    puts "\n#{player.name}'s total points:"
        player.each_found_piece do |itemss|
            puts "#{itemss.points} total #{itemss.item} points"
        end
    puts "#{player.points} grand total points \n "
end