acpc_poker_match_state 2.1.1 → 2.2.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eec5b1140f9658aa149bec99c28f5bc6e6d5e321
|
4
|
+
data.tar.gz: af2f7d5ccdadafc42c28b6a2b2548e209a34002e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2990effadcb5f3047d2b2fc398dcc2c4dfe6ec24869dcac727dab9e8c2a5db166db4cf28ed2f6d8291b751ea40f2ee3f12088b08cada41ec86fde66db70d7f81
|
7
|
+
data.tar.gz: 15008c34ee34c5f33a32350a9d0d93c453f950496dd18a82b118e3daedd19b50d16446110823e7a1f42ded5d354865c95fbfdde085b746b5421c89dfe2dbbfdc
|
@@ -306,8 +306,16 @@ module AcpcPokerMatchState
|
|
306
306
|
)
|
307
307
|
end
|
308
308
|
|
309
|
-
def wager_legal?
|
310
|
-
|
309
|
+
def wager_legal?(player = next_player_to_act)
|
310
|
+
!facing_all_in?(player)
|
311
|
+
end
|
312
|
+
|
313
|
+
def facing_all_in?(player = next_player_to_act)
|
314
|
+
chip_contributions_after_calling(player) >= @game_def.chip_stacks[position_relative_to_dealer(player)]
|
315
|
+
end
|
316
|
+
|
317
|
+
def chip_contributions_after_calling(player = next_player_to_act)
|
318
|
+
player.chip_contributions.inject(:+) + amount_to_call(player)
|
311
319
|
end
|
312
320
|
|
313
321
|
# @return [Boolean] +true+ if the current hand is the last in the 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: 2.
|
4
|
+
version: 2.2.1
|
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-06-
|
11
|
+
date: 2013-06-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: acpc_poker_types
|