acpc_poker_types 7.2.4 → 7.2.5

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: 29d52abf33b84eca7383eae28cb21589864f6047
4
- data.tar.gz: b25c8d6b77c61bb65a82fc5efe5b22de9fabb8a0
3
+ metadata.gz: 9127758f2204df342861cdd5e76c6de58a78fdee
4
+ data.tar.gz: 502b43ac46044d4132f09fe30978d1b1931adbce
5
5
  SHA512:
6
- metadata.gz: 89baac270d2453a97e52ffe7d62a9a0277a58eb13150017327544b9e5e7c340dcb417d59ebeb5504bf1f386c158e68950be1797e2d416ebb3d43b4b8541c769a
7
- data.tar.gz: 039f04569ffa7f0f1b99fa62633194b83a78511f4f9a05e516b8eb9b58cd743107cfcfc03519f423ef49105368bbbbb0e97c6d3451ce086ccd1cd1278fed6e50
6
+ metadata.gz: 8ff33a4324600f23aece029bb96fbc40a5fddf4fe545a8145f898c4671aa56a03d70deb50417864726e3820f815624fdcf4b7d7c0c6ed7c2dcc201df88b40ba0
7
+ data.tar.gz: 676bb3d6b95d46da2f8e712d2afa812e9147c840c60d3da179bd49f67742a6470ae8570d8e52d6605543a1399a5b9f6c5c6c11201586a33a96b3cb0cbc712d9c
@@ -132,15 +132,15 @@ class MatchState < DelegateClass(String)
132
132
 
133
133
  # @return [Array<Hand>] The list of hole card hands for each player.
134
134
  def all_hands
135
- @all_hands ||= -> do
136
- lcl_hole_card_hands = all_string_hands(@hands_string).map do |string_hand|
137
- Hand.from_acpc string_hand
138
- end
139
- while lcl_hole_card_hands.length < number_of_players
140
- lcl_hole_card_hands.push Hand.new
141
- end
142
- lcl_hole_card_hands
143
- end.call
135
+ return @all_hands unless @all_hands.nil?
136
+
137
+ @all_hands = all_string_hands(@hands_string).map do |string_hand|
138
+ Hand.from_acpc string_hand
139
+ end
140
+ while @all_hands.length < number_of_players
141
+ @all_hands.push Hand.new
142
+ end
143
+ @all_hands
144
144
  end
145
145
 
146
146
  # @param game_def [GameDefinition] A game definition by which the actions can be interpreted
@@ -174,17 +174,17 @@ class MatchState < DelegateClass(String)
174
174
 
175
175
  # @return [BoardCards] All visible community cards on the board.
176
176
  def community_cards
177
- @community_cards ||= -> do
178
- lcl_community_cards = BoardCards.new(
179
- all_sets_of_community_cards(@community_cards_string).map do |cards_per_round|
180
- Card.cards(cards_per_round)
181
- end
182
- )
183
- if lcl_community_cards.round < @community_cards_string.count(COMMUNITY_CARD_SEPARATOR)
184
- lcl_community_cards.next_round!
177
+ return @community_cards unless @community_cards.nil?
178
+
179
+ @community_cards = BoardCards.new(
180
+ all_sets_of_community_cards(@community_cards_string).map do |cards_per_round|
181
+ Card.cards(cards_per_round)
185
182
  end
186
- lcl_community_cards
187
- end.call
183
+ )
184
+ if @community_cards.round < @community_cards_string.count(COMMUNITY_CARD_SEPARATOR)
185
+ @community_cards.next_round!
186
+ end
187
+ @community_cards
188
188
  end
189
189
 
190
190
  # @return [Integer] The zero indexed current round number.
@@ -203,11 +203,11 @@ class MatchState < DelegateClass(String)
203
203
  # @example If there are two opponents, one with AhKs and the other with QdJc, then
204
204
  # list_of_opponents_hole_cards == [AhKs:Hand, QdJc:Hand]
205
205
  def opponent_hands
206
- @opponent_hands ||= -> do
207
- hands = all_hands.dup
208
- hands.delete_at @position_relative_to_dealer
209
- hands
210
- end.call
206
+ return @opponent_hands unless @opponent_hands.nil?
207
+
208
+ @opponent_hands = all_hands.dup
209
+ @opponent_hands.delete_at @position_relative_to_dealer
210
+ @opponent_hands
211
211
  end
212
212
 
213
213
  # @return [Boolean] Reports whether or not it is the first state of the first round.
@@ -1,3 +1,3 @@
1
1
  module AcpcPokerTypes
2
- VERSION = '7.2.4'
2
+ VERSION = '7.2.5'
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.2.4
4
+ version: 7.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dustin Morrill