acpc_poker_types 7.2.2 → 7.2.3
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/game_definition.rb +10 -1
- data/lib/acpc_poker_types/version.rb +1 -1
- data/spec/game_definition_spec.rb +22 -2
- 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: ebd2152146b1dc9244929e8da7149ef24f1a9aaa
|
|
4
|
+
data.tar.gz: 436a9675970b24bef46497299274ce873fa80416
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2e2cf819cb172e7827bcfa58d404ef15ca6b4b89adb04d4b9898299c7322d8d855cd4eed6f67f964602dda491fc17609bf0c477d4b96c10ebef671e51f4548e3
|
|
7
|
+
data.tar.gz: 3129577ddf84a23a046723902f9a5f55f4f1a51ea325e68477cebf59d0f0328dd682e04a036204d43f3802092e91821caf6c0628e9993c7476534820d6fc3316
|
|
@@ -265,7 +265,16 @@ module AcpcPokerTypes
|
|
|
265
265
|
|
|
266
266
|
def assign_definitions!(definitions)
|
|
267
267
|
definitions.each do |key, value|
|
|
268
|
-
instance_variable_set(
|
|
268
|
+
instance_variable_set(
|
|
269
|
+
"@#{key}",
|
|
270
|
+
(
|
|
271
|
+
begin
|
|
272
|
+
value.dup
|
|
273
|
+
rescue TypeError
|
|
274
|
+
value
|
|
275
|
+
end
|
|
276
|
+
)
|
|
277
|
+
)
|
|
269
278
|
end
|
|
270
279
|
end
|
|
271
280
|
|
|
@@ -13,7 +13,7 @@ describe GameDefinition do
|
|
|
13
13
|
describe '::new' do
|
|
14
14
|
it 'creates a new game definition from a hash' do
|
|
15
15
|
x_hash = {
|
|
16
|
-
betting_type: 'limit',
|
|
16
|
+
betting_type: 'limit',
|
|
17
17
|
chip_stacks: [10] * 3,
|
|
18
18
|
number_of_players: 3,
|
|
19
19
|
blinds: [2] * 3,
|
|
@@ -26,7 +26,27 @@ describe GameDefinition do
|
|
|
26
26
|
number_of_hole_cards: 2,
|
|
27
27
|
number_of_board_cards: [2] * 4
|
|
28
28
|
}
|
|
29
|
-
GameDefinition.new(x_hash)
|
|
29
|
+
patient = GameDefinition.new(x_hash)
|
|
30
|
+
x_hash[:first_player_positions].map! { |pos| pos - 1 }
|
|
31
|
+
patient.to_h.must_equal(x_hash)
|
|
32
|
+
end
|
|
33
|
+
it 'does not modify the input hash values' do
|
|
34
|
+
x_hash = {
|
|
35
|
+
betting_type: 'limit',
|
|
36
|
+
chip_stacks: [10] * 3,
|
|
37
|
+
number_of_players: 3,
|
|
38
|
+
blinds: [2] * 3,
|
|
39
|
+
raise_sizes: [2] * 3,
|
|
40
|
+
number_of_rounds: 4,
|
|
41
|
+
first_player_positions: [1] * 4,
|
|
42
|
+
max_number_of_wagers: [3] * 4,
|
|
43
|
+
number_of_suits: 4,
|
|
44
|
+
number_of_ranks: 13,
|
|
45
|
+
number_of_hole_cards: 2,
|
|
46
|
+
number_of_board_cards: [2] * 4
|
|
47
|
+
}
|
|
48
|
+
GameDefinition.new(x_hash)
|
|
49
|
+
x_hash[:first_player_positions].must_equal [1]*4
|
|
30
50
|
end
|
|
31
51
|
end
|
|
32
52
|
|
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.2.
|
|
4
|
+
version: 7.2.3
|
|
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-11 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: process_runner
|