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: 642f9f970caaada092546e4319bbe6480bc4cd05
4
- data.tar.gz: 6fd5124eca528028d559a4cbfe0307e89aa98ac5
3
+ metadata.gz: f111736700344797220da00375029782eff89e9e
4
+ data.tar.gz: 800f6221728fcf668c1e1ff8053d204966c467d7
5
5
  SHA512:
6
- metadata.gz: f9999e158a2c253ec86fbf7b64a6425e02ec5578f75c8a62a73af4526d8dccf3449ab28993bb5d2cc3c8c1e453ca6f9fd37724e9d195a817b2efb55ab3ed9c83
7
- data.tar.gz: bd2a0844ac681c99005ac61b7aad675c8c51a42a0ecd218cf5a1785bcb39006f8bdb45534c9fa4ec53ceadae1e0df71a7992a1cd64e59a33036f73bc382737e3
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?() @match_has_ended end
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
@@ -1,3 +1,3 @@
1
1
  module AcpcPokerPlayerProxy
2
- VERSION = "1.4.0"
2
+ VERSION = "1.5.0"
3
3
  end
@@ -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 'BasicProxy'
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.0
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-09 00:00:00.000000000 Z
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