liars_dice 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/liars_dice.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |gem|
2
2
  gem.name = 'liars_dice'
3
- gem.version = '0.0.3'
3
+ gem.version = '0.0.4'
4
4
  gem.date = '2013-07-09'
5
5
  gem.summary = "Liar's Dice game"
6
6
  gem.description = "A liar's dice botting environment, developed by Aisle50"
@@ -89,7 +89,7 @@ module LiarsDice
89
89
 
90
90
  def roll_dice
91
91
  die = (1..6).to_a
92
- alive_seats.each do |seat|
92
+ seats.each do |seat|
93
93
  dice = []
94
94
  seat.dice_left.times do
95
95
  dice << die.sample
data/spec/engine_spec.rb CHANGED
@@ -326,7 +326,7 @@ describe "Engine" do
326
326
  before do
327
327
  # Roll the dice a bunch of times and capture the result in a hash
328
328
  # keyed by die face_value
329
- engine.stub(:alive_seats).and_return([seat])
329
+ engine.stub(:seats).and_return([seat])
330
330
  seat.stub(:dice_left).and_return(6000)
331
331
  rolled_dice = []
332
332
  seat.stub(:dice=) { |val| rolled_dice = val }
@@ -347,13 +347,13 @@ describe "Engine" do
347
347
  end
348
348
  end
349
349
 
350
- it "only rolls dice for seats that are alive" do
350
+ it "rolls dice for all seats" do
351
351
  s1 = Seat.new(0, {}, 5)
352
352
  s1.stub(:alive?).and_return(false)
353
353
  s2 = Seat.new(1, {}, 5)
354
354
  s2.stub(:alive?).and_return(true)
355
355
  engine.stub(:seats).and_return([s1, s2])
356
- s1.should_not_receive(:dice=)
356
+ s1.should_receive(:dice=)
357
357
  s2.should_receive(:dice=)
358
358
  engine.roll_dice
359
359
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: liars_dice
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: