acpc_poker_player_proxy 1.0.1 → 1.1.0
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/bin/acpc_poker_player_proxy +15 -6
- data/lib/acpc_poker_player_proxy/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: 17689f1c93e61d378ec0fdc5c734d33f4d45af42
|
4
|
+
data.tar.gz: 73c9588dad21bc9d11832605566e3a42e5de348f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fa6b3ccc4c1390d26737b88895af11f8e5ead381e5fe8a195dcb08c78848f192b1ecbf3bc96816692fdcb524e85bb9eb443ae63d405914434ddbcd54b4c2b59f
|
7
|
+
data.tar.gz: e5a5974e84c0c509d1dbf348762d9356ef8186b848c627832a106bd06bd9832af3fa5ebb1da86e4fa1da959048c25fc8f62f459c5a726445fab28e2fccb2d7f4
|
data/bin/acpc_poker_player_proxy
CHANGED
@@ -10,14 +10,23 @@ class App
|
|
10
10
|
include Methadone::CLILogging
|
11
11
|
|
12
12
|
main do |port, seat, game_definition, player_names, number_of_hands, host|
|
13
|
-
|
14
|
-
AcpcPokerPlayerProxy::PlayerProxy.new(
|
13
|
+
proxy = AcpcPokerPlayerProxy::PlayerProxy.new(
|
15
14
|
AcpcDealer::ConnectionInformation.new(port, host),
|
16
|
-
seat,
|
15
|
+
seat.to_i - 1,
|
17
16
|
game_definition,
|
18
|
-
player_names,
|
19
|
-
number_of_hands
|
20
|
-
)
|
17
|
+
player_names[1..-2],
|
18
|
+
number_of_hands.to_i
|
19
|
+
) do |patt|
|
20
|
+
p patt.transition.next_state.to_s
|
21
|
+
end
|
22
|
+
|
23
|
+
while !proxy.players_at_the_table.match_ended? do
|
24
|
+
print 'Your turn to act: '; STDOUT.flush
|
25
|
+
action = AcpcPokerTypes::PokerAction.new(STDIN.gets.chomp)
|
26
|
+
proxy.play! action do |patt|
|
27
|
+
p patt.transition.next_state.to_s
|
28
|
+
end
|
29
|
+
end
|
21
30
|
end
|
22
31
|
|
23
32
|
# Declare command-line interface
|