acpc_poker_match_state 1.0.1 → 1.0.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 32834928565a4f31baea9a06011c5e5f6882cdd5
4
- data.tar.gz: 2dd098425709cf58ee33db8f6d0dccb2abaec97b
3
+ metadata.gz: bfc6292969df1d806bb6c50b5fb85c453122ed95
4
+ data.tar.gz: f98250d114194baa3a13860291c304d7fc7ac361
5
5
  SHA512:
6
- metadata.gz: f481f1cd37a1f2f72574d331e14c551b44a97b064ff0804db144989e7640b58c8dd7ff00a14fec263bc10b1b17af212d6851fc2cfa0743e3cff108e0f6bd7dda
7
- data.tar.gz: 1ed5a03f6fa31cecb0d680a084f1f4dda33ef772b007e3fc6967933e613269e79da0d2013406efb61f92c399d9264e391ad5db9d52e72f15b2b038e2c3319ca5
6
+ metadata.gz: 1dd354bc1d4d13395db2d6d085e095bdc7c14f25a7bd7a6486cd66d25f7fdd8f01059393d2fa1b27e0a2c2001aac829618ba14d81dfed880c37a4e40344cfc88
7
+ data.tar.gz: 8c6554d817331efaa594b802976a910bacddf99bc37e08f906ed9c0e6d69aa1bc92bd3ae57dc3dab5eb803663e9357eb9a4391a7df8c3151ca8883add92a90ce
@@ -373,7 +373,7 @@ module AcpcPokerMatchState
373
373
  player_who_acted_last.take_action!(
374
374
  action_with_context,
375
375
  pot_gained_chips: chips_contributed_to_pot_this_round?(@transition.next_state.round_in_which_last_action_taken),
376
- sees_wager: player_sees_wager?
376
+ sees_wager: player_sees_wager?(player_who_acted_last)
377
377
  )
378
378
 
379
379
  if @transition.new_round?
@@ -1,3 +1,3 @@
1
1
  module AcpcPokerMatchState
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
@@ -14,7 +14,7 @@
14
14
  <img src="./assets/0.7.1/loading.gif" alt="loading"/>
15
15
  </div>
16
16
  <div id="wrapper" style="display:none;">
17
- <div class="timestamp">Generated <abbr class="timeago" title="2013-05-11T19:06:45-06:00">2013-05-11T19:06:45-06:00</abbr></div>
17
+ <div class="timestamp">Generated <abbr class="timeago" title="2013-05-22T14:09:57-06:00">2013-05-22T14:09:57-06:00</abbr></div>
18
18
  <ul class="group_tabs"></ul>
19
19
 
20
20
  <div id="content">
@@ -3,6 +3,7 @@ require_relative 'support/spec_helper'
3
3
 
4
4
  require 'acpc_dealer'
5
5
  require 'acpc_poker_types/poker_action'
6
+ require 'acpc_poker_types/card'
6
7
  require 'acpc_poker_match_state/players_at_the_table'
7
8
 
8
9
  describe AcpcPokerMatchState::PlayersAtTheTable do
@@ -58,6 +59,13 @@ describe AcpcPokerMatchState::PlayersAtTheTable do
58
59
  if @match.current_hand
59
60
  patient.hand_ended?.must_equal @match.current_hand.final_turn?
60
61
  patient.match_ended?.must_equal (@match.final_hand? && @match.current_hand.final_turn?)
62
+ unless @match.current_hand.final_turn?
63
+ patient.transition.next_state.list_of_hole_card_hands.each do |hand|
64
+ hand.each do |card|
65
+ card.must_be_kind_of AcpcPokerTypes::Card
66
+ end
67
+ end
68
+ end
61
69
  end
62
70
  patient.last_hand?.must_equal (
63
71
  if @match.final_hand?.nil?
@@ -74,27 +82,27 @@ describe AcpcPokerMatchState::PlayersAtTheTable do
74
82
  end
75
83
 
76
84
  def check_player_blind_relation(patient)
77
- expected_player_blind_relation = @match.player_blind_relation
85
+ x_player_blind_relation = @match.player_blind_relation
78
86
  patient.player_blind_relation.each do |player, blind|
79
- expected_player_and_blind = expected_player_blind_relation.to_a.find do |player_and_blind|
87
+ x_player_and_blind = x_player_blind_relation.to_a.find do |player_and_blind|
80
88
  player_and_blind.first.seat == player.seat
81
89
  end
82
90
 
83
- expected_player = expected_player_and_blind.first
84
- expected_blind = expected_player_and_blind.last
91
+ x_player = x_player_and_blind.first
92
+ x_blind = x_player_and_blind.last
85
93
 
86
- player.close_enough?(expected_player).must_equal true
87
- blind.must_equal expected_blind
94
+ player.close_enough?(x_player).must_equal true
95
+ blind.must_equal x_blind
88
96
  end
89
97
  end
90
98
  def check_betting_sequence(patient)
91
99
  patient_betting_sequence = patient.betting_sequence.map do |actions|
92
100
  actions.map { |action| AcpcPokerTypes::PokerAction.new(action).to_s }
93
101
  end
94
- expected_betting_sequence = @match.betting_sequence.map do |actions|
102
+ x_betting_sequence = @match.betting_sequence.map do |actions|
95
103
  actions.map { |action| AcpcPokerTypes::PokerAction.new(action).to_s }
96
104
  end
97
- patient_betting_sequence.must_equal expected_betting_sequence
105
+ patient_betting_sequence.must_equal x_betting_sequence
98
106
 
99
107
  patient.betting_sequence_string.scan(/([a-z]\d*|\/)/).flatten.map do |action|
100
108
  if action.match(/\//)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acpc_poker_match_state
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dustin Morrill
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-05-12 00:00:00.000000000 Z
11
+ date: 2013-05-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: acpc_poker_types