acpc_poker_types 7.4.1 → 7.4.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 +4 -4
- data/lib/acpc_poker_types/match_state.rb +13 -15
- data/lib/acpc_poker_types/version.rb +1 -1
- data/spec/match_state_spec.rb +5 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 099f30853711e2a7c0a65e11d50ab3a966d464cf
|
4
|
+
data.tar.gz: e2c91e822ac94287934c5ff12a337e1e4561be5d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 48808756581261ee187fc168ea47d83d65809df856d1bd09388217832907bc6f41cafce431b2bb98521a210abb74594c42f42ad6386dcb7dac7eb909ae696fc1
|
7
|
+
data.tar.gz: c7ec858f2451f4cb4502686eeeb5d5d00f29c0c74a4aac469751e1d810528297157450f6e0b22a83bd917e548bf8ce8b40f3a3c14bd8bf51768329ac2508adc9
|
@@ -442,17 +442,21 @@ class MatchState < DelegateClass(String)
|
|
442
442
|
cost: cost
|
443
443
|
)
|
444
444
|
|
445
|
+
@player_acting_sequence[current_round] << @next_to_act
|
446
|
+
@next_to_act = @players.next_to_act(@next_to_act)
|
447
|
+
|
445
448
|
adjust_min_wager!(
|
446
449
|
@precise_betting_sequence[current_round].last,
|
447
|
-
@
|
450
|
+
@player_acting_sequence[current_round].last
|
448
451
|
)
|
449
452
|
|
450
|
-
@players[@
|
453
|
+
@players[@player_acting_sequence[current_round].last].append_action!(
|
451
454
|
@precise_betting_sequence[current_round].last, current_round
|
452
455
|
)
|
453
456
|
|
454
|
-
@
|
455
|
-
|
457
|
+
if @next_to_act && @players[@next_to_act].stack < (@players.amount_to_call(@next_to_act) + @min_wager_by)
|
458
|
+
@min_wager_by = @players[@next_to_act].stack - @players.amount_to_call(@next_to_act)
|
459
|
+
end
|
456
460
|
|
457
461
|
self
|
458
462
|
end
|
@@ -500,18 +504,12 @@ class MatchState < DelegateClass(String)
|
|
500
504
|
end
|
501
505
|
|
502
506
|
def adjust_min_wager!(action, acting_player_position)
|
503
|
-
|
504
|
-
wager_size = ChipStack.new(
|
505
|
-
action.cost.to_f - @players.amount_to_call(acting_player_position)
|
506
|
-
)
|
507
|
-
if wager_size > @min_wager_by
|
508
|
-
@min_wager_by = wager_size
|
509
|
-
end
|
510
|
-
end
|
507
|
+
return self unless PokerAction::MODIFIABLE_ACTIONS.include?(action.action)
|
511
508
|
|
512
|
-
|
513
|
-
|
514
|
-
|
509
|
+
wager_size = ChipStack.new(
|
510
|
+
action.cost.to_f - @players.amount_to_call(acting_player_position)
|
511
|
+
)
|
512
|
+
@min_wager_by = wager_size if wager_size > @min_wager_by
|
515
513
|
|
516
514
|
self
|
517
515
|
end
|
data/spec/match_state_spec.rb
CHANGED
@@ -1091,7 +1091,7 @@ describe MatchState do
|
|
1091
1091
|
wager_size = 10
|
1092
1092
|
x_game_def = GameDefinition.new(
|
1093
1093
|
first_player_positions: [0, 0, 0],
|
1094
|
-
chip_stacks: [
|
1094
|
+
chip_stacks: [10000, 20000, 15000],
|
1095
1095
|
blinds: [0, 10, 5],
|
1096
1096
|
raise_sizes: [wager_size]*3,
|
1097
1097
|
number_of_ranks: 3
|
@@ -1137,6 +1137,10 @@ describe MatchState do
|
|
1137
1137
|
MatchState.parse(
|
1138
1138
|
"MATCHSTATE:1:1:r11000c/cr19950c/c:|KhKc/Js4c9d/Jc"
|
1139
1139
|
).min_wager_by(game_def).must_equal 50
|
1140
|
+
|
1141
|
+
MatchState.parse(
|
1142
|
+
"MATCHSTATE:0:0:r15212:Jh7d|"
|
1143
|
+
).min_wager_by(game_def).must_equal 4788
|
1140
1144
|
end
|
1141
1145
|
end
|
1142
1146
|
describe '#next_to_act' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: acpc_poker_types
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.4.
|
4
|
+
version: 7.4.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-08-
|
11
|
+
date: 2013-08-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: process_runner
|