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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bfc6292969df1d806bb6c50b5fb85c453122ed95
|
4
|
+
data.tar.gz: f98250d114194baa3a13860291c304d7fc7ac361
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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?
|
data/spec/coverage/index.html
CHANGED
@@ -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-
|
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
|
-
|
85
|
+
x_player_blind_relation = @match.player_blind_relation
|
78
86
|
patient.player_blind_relation.each do |player, blind|
|
79
|
-
|
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
|
-
|
84
|
-
|
91
|
+
x_player = x_player_and_blind.first
|
92
|
+
x_blind = x_player_and_blind.last
|
85
93
|
|
86
|
-
player.close_enough?(
|
87
|
-
blind.must_equal
|
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
|
-
|
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
|
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.
|
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-
|
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
|