Module: GreedGame
- Defined in:
- lib/greed_game.rb,
lib/greed_game/version.rb
Constant Summary collapse
- VERSION =
"0.0.3"
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.name ⇒ Object
7 8 9 |
# File 'lib/greed_game.rb', line 7 def self.name "Greed Game" end |
Instance Method Details
#finished ⇒ Object
31 32 33 34 |
# File 'lib/greed_game.rb', line 31 def finished return "#{@winner[0].name} is winner" if @winner.count == 1 "Winner is absent" end |
#in_progress ⇒ Object
21 22 23 24 25 26 27 28 29 |
# File 'lib/greed_game.rb', line 21 def in_progress while next_round? calculate_max_score @players.each do |player| player.roll(@dices) end end winner end |