acpc_poker_types 6.0.1 → 6.0.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: 077e02fa72f0d3b9c45a81861f80ba211120ce02
4
- data.tar.gz: 31d32c7e15e10b035bebfde39ad27048833061d1
3
+ metadata.gz: b4356bae466a6937d427c1addffe9b4b56a56752
4
+ data.tar.gz: 53d930d856434f2e99229eba50d53bb9c49c0777
5
5
  SHA512:
6
- metadata.gz: cf260e05102c9fc287e082591b15807a8ccdb0390ba820566bb1b3784c1416785385d1c75bbb6d67ce4ae202a53dc3c8136fa96416f407accbae10f5a2f45c07
7
- data.tar.gz: e40999ab650b6c063592e1af2f71e2fad9e1f530cbff19daac45e808507c62cfba77f32b0e13629431d89268b684f7dba3f4a5da593849fef4233033b2ecb6dc
6
+ metadata.gz: 445658f326cc4a00cfe5dee77be60bf2b88c5d59cb341a7ea7d7d7bbc1656ae49ec5d4fa00829fa1d234391521eddd86b9c896e1bc7c7e9897f9248a2d7e8164
7
+ data.tar.gz: a5ac949dddab857a288f1b641b91627760d70c4c09e041c8865f5854ea0561d319c0d55a100d551e938758f9d3e681a1cb6eda94e9209d77237481f07bbbc19c
@@ -199,11 +199,15 @@ class MatchState
199
199
 
200
200
  # @return [Boolean] Reports whether or not it is the first state of the first round.
201
201
  def first_state_of_first_round?
202
- @first_state_of_first_round ||= @betting_sequence_string.empty?
202
+ return @first_state_of_first_round unless @first_state_of_first_round.nil?
203
+
204
+ @first_state_of_first_round = @betting_sequence_string.empty?
203
205
  end
204
206
 
205
207
  def first_state_of_round?
206
- @first_state_of_round ||= @betting_sequence_string[-1] == BETTING_SEQUENCE_SEPARATOR
208
+ return @first_state_of_round unless @first_state_of_round.nil?
209
+
210
+ @first_state_of_round = @betting_sequence_string[-1] == BETTING_SEQUENCE_SEPARATOR
207
211
  end
208
212
 
209
213
  # @return [Integer] The number of players in this match.
@@ -314,7 +318,9 @@ class MatchState
314
318
 
315
319
  # @return [Boolean] +true+ if the hand has ended, +false+ otherwise.
316
320
  def hand_ended?(game_def)
317
- @hand_ended ||= reached_showdown? || players(game_def).count { |player| player.inactive? } >= number_of_players - 1
321
+ return @hand_ended unless @hand_ended.nil?
322
+
323
+ @hand_ended = reached_showdown? || players(game_def).count { |player| player.inactive? } >= number_of_players - 1
318
324
  end
319
325
 
320
326
  def reached_showdown?
@@ -322,7 +328,9 @@ class MatchState
322
328
  end
323
329
 
324
330
  def opponents_cards_visible?
325
- @opponents_cards_visible ||= all_hands.count { |h| !h.empty? } > 1 # At least one opponent hand visible
331
+ return @opponents_cards_visible unless @opponents_cards_visible.nil?
332
+
333
+ @opponents_cards_visible = all_hands.count { |h| !h.empty? } > 1 # At least one opponent hand visible
326
334
  end
327
335
 
328
336
  def pot(game_def)
@@ -1,3 +1,3 @@
1
1
  module AcpcPokerTypes
2
- VERSION = '6.0.1'
2
+ VERSION = '6.0.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: 6.0.1
4
+ version: 6.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dustin Morrill