acpc_poker_types 7.8.1 → 7.8.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 +14 -7
- data/lib/acpc_poker_types/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 666ccd23f1684eff826fcd972283d43a120f1630
|
|
4
|
+
data.tar.gz: 39c8249be7ffc005bef522651c27620d9f277467
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 03ac1d7180fb340acd5686555416d163e12cfc07b26dc80e4d26346e49698c7a4c4153c539860cbfd08fd0d753f71ae656cbbac4307304ce81dba2fbd0a0a6d8
|
|
7
|
+
data.tar.gz: e2545d0bda5dbe860c5494802c70d17ac4f927b1011b2cc6be25a26accbc23a61e84d8ce97760bdb26c0ab3995e9ff2319b6f8200ef681060f65b863c8d57b0e
|
|
@@ -169,12 +169,14 @@ class MatchState < DelegateClass(String)
|
|
|
169
169
|
@next_to_act = previous_state.next_to_act(game_def)
|
|
170
170
|
@players = previous_state.players(game_def).dup
|
|
171
171
|
@players.each_with_index { |player, i| player.hand = all_hands[i] }
|
|
172
|
-
@player_acting_sequence = previous_state.player_acting_sequence(
|
|
172
|
+
@player_acting_sequence = previous_state.player_acting_sequence(
|
|
173
|
+
game_def
|
|
174
|
+
).map { |per_round| per_round.dup }
|
|
173
175
|
@min_wager_by = previous_state.min_wager_by(game_def)
|
|
174
176
|
|
|
175
177
|
process_action!(last_action, round_in_which_last_action_taken)
|
|
176
178
|
init_new_round!(game_def, round) if round != previous_state.round
|
|
177
|
-
|
|
179
|
+
finish_update!(game_def)
|
|
178
180
|
end
|
|
179
181
|
|
|
180
182
|
super to_s
|
|
@@ -353,11 +355,9 @@ class MatchState < DelegateClass(String)
|
|
|
353
355
|
@precise_betting_sequence = []
|
|
354
356
|
@min_wager_by = game_def.min_wagers.first
|
|
355
357
|
|
|
356
|
-
walk_over_betting_sequence!
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
distribute_chips!(game_def) if hand_ended?(game_def)
|
|
358
|
+
walk_over_betting_sequence! game_def
|
|
359
|
+
compute_winning_players! game_def
|
|
360
|
+
finish_update! game_def
|
|
361
361
|
|
|
362
362
|
@players
|
|
363
363
|
end
|
|
@@ -424,6 +424,13 @@ class MatchState < DelegateClass(String)
|
|
|
424
424
|
|
|
425
425
|
private
|
|
426
426
|
|
|
427
|
+
def finish_update!(game_def)
|
|
428
|
+
if hand_ended?(game_def)
|
|
429
|
+
distribute_chips! game_def
|
|
430
|
+
@next_to_act = nil
|
|
431
|
+
end
|
|
432
|
+
end
|
|
433
|
+
|
|
427
434
|
def compute_winning_players!(game_def)
|
|
428
435
|
hand_strengths = players(game_def).map do |player|
|
|
429
436
|
if player.folded?
|