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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 99124f9ca2e14465f34ed7631c27136d17141c6c
4
- data.tar.gz: f689b4fa16348fd07f3f9ad849080c35f01bd330
3
+ metadata.gz: 666ccd23f1684eff826fcd972283d43a120f1630
4
+ data.tar.gz: 39c8249be7ffc005bef522651c27620d9f277467
5
5
  SHA512:
6
- metadata.gz: 4db8799d9ea45ecd5bf51841ad0b5bc6aa91b6b89830832ceb0d0995be3a17d257efba675fb87c9f47e71b5a72c8b3e32f0d9bbe57425006f162f8464e9ce024
7
- data.tar.gz: 1e3b3e5643a9ce18de01c33baa441bc64cbb922bbd9badba1169e6fe196194e502cc6a10a7ff29ace9a8e678dafc629ffb4246eee0b259295cdf7af4cb72aa00
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(game_def).map { |per_round| per_round.dup }
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
- distribute_chips!(game_def) if hand_ended?(game_def)
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!(game_def)
357
-
358
- compute_winning_players!(game_def)
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?
@@ -1,3 +1,3 @@
1
1
  module AcpcPokerTypes
2
- VERSION = '7.8.1'
2
+ VERSION = '7.8.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acpc_poker_types
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.8.1
4
+ version: 7.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dustin Morrill