martimatix / Ruby_Dice

A Yahtzee clone written in ruby that runs in the terminal
MIT License
3 stars 0 forks source link

#display_dice #53

Closed Zrp200 closed 9 years ago

Zrp200 commented 9 years ago
    def display_dice(i)
        dd = Array.new
        dd << String.new.center(80, ?-) 
        dd << "Here are your dice. You have have #{3-i} #{i==2? "roll":"rolls"} remaining.\n\n"
        dd << "\tDice\t\tZ\tX\tC\tV\tB"
        dd << "\tValues\t\t" + score.dice.values.map{|value| value.to_s}.join(?\t)
        dd << String.new.center(80, ?-)
        dd.each do |line|
            puts line
            sleep 0.2
        end
martimatix commented 9 years ago

Simplified in e2efd7e76b93d50fbb4fe439b53b89f21a4cdab2