acpc_poker_player_proxy 1.4.0 → 1.5.0
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: f111736700344797220da00375029782eff89e9e
|
4
|
+
data.tar.gz: 800f6221728fcf668c1e1ff8053d204966c467d7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5b0894e50fb4c57a443efc823d23a836d31e27a42652654f45384152fc35ef249bf2c55de42a69fd78beb1fb4ed2a1a81461f03dab52a2b88fcc7e9ee13cca76
|
7
|
+
data.tar.gz: f7d6c5dd37bc12ca27b5d894b3f33d572b34760128d20887867a79fd17fa3df2978f99edadad427a0dd877229daefa2b9cd11b6f0b00b1562dbaae8143bc69f6
|
@@ -81,7 +81,16 @@ class PlayerProxy < DelegateClass(AcpcPokerTypes::PlayersAtTheTable)
|
|
81
81
|
end
|
82
82
|
end
|
83
83
|
|
84
|
-
def match_ended?(
|
84
|
+
def match_ended?(max_num_hands = nil)
|
85
|
+
@match_has_ended ||= (
|
86
|
+
(
|
87
|
+
max_num_hands &&
|
88
|
+
hand_ended? &&
|
89
|
+
match_state.hand_number >= max_num_hands - 1
|
90
|
+
) ||
|
91
|
+
!connected?
|
92
|
+
)
|
93
|
+
end
|
85
94
|
|
86
95
|
def next_hand!
|
87
96
|
begin
|
data/spec/player_proxy_spec.rb
CHANGED
@@ -67,7 +67,6 @@ describe PlayerProxy do
|
|
67
67
|
each_match(num_hands) do |match|
|
68
68
|
@match = match
|
69
69
|
@match.for_every_seat! do |users_seat|
|
70
|
-
|
71
70
|
@basic_proxy = init_basic_proxy
|
72
71
|
|
73
72
|
@patient = PlayerProxy.new(DEALER_INFO, @match.match_def.game_def, users_seat) do |patt|
|
@@ -108,7 +107,6 @@ describe PlayerProxy do
|
|
108
107
|
).once
|
109
108
|
end
|
110
109
|
end
|
111
|
-
|
112
110
|
@match.hand_number.must_equal(num_hands - 1)
|
113
111
|
@match.current_hand.end_hand!
|
114
112
|
@match.end_match!
|
@@ -129,7 +127,7 @@ describe PlayerProxy do
|
|
129
127
|
end
|
130
128
|
end
|
131
129
|
def init_basic_proxy
|
132
|
-
@basic_proxy = mock
|
130
|
+
@basic_proxy = mock('BasicProxy') { stubs :send_comment }
|
133
131
|
BasicProxy.expects(:new).with(DEALER_INFO).returns(@basic_proxy).once
|
134
132
|
@basic_proxy
|
135
133
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: acpc_poker_player_proxy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dustin Morrill
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-01-
|
11
|
+
date: 2017-01-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: acpc_poker_basic_proxy
|