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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: aa34bb9cc4299dc61eec64b87e16f088d65933fc
4
- data.tar.gz: 3b9b502bf9bb18d1b09be40c171129160448c08b
3
+ metadata.gz: 17689f1c93e61d378ec0fdc5c734d33f4d45af42
4
+ data.tar.gz: 73c9588dad21bc9d11832605566e3a42e5de348f
5
5
  SHA512:
6
- metadata.gz: 1669ec08d53e04b801af3c8dafa771187069ab522818d9d851b505f43ceec9fdbaefd251eb60ceb0cf4e7e4018bffc9b7dc843119c7c06b599a266cfb58ae6d2
7
- data.tar.gz: 678dcae1bedb828907030038daf3396e5c666779aa8490b60559980e8156df909284cceb0e80cc2c2b5277df2c6ddf672d385e6c4dd149ac506a45a27ac1a292
6
+ metadata.gz: fa6b3ccc4c1390d26737b88895af11f8e5ead381e5fe8a195dcb08c78848f192b1ecbf3bc96816692fdcb524e85bb9eb443ae63d405914434ddbcd54b4c2b59f
7
+ data.tar.gz: e5a5974e84c0c509d1dbf348762d9356ef8186b848c627832a106bd06bd9832af3fa5ebb1da86e4fa1da959048c25fc8f62f459c5a726445fab28e2fccb2d7f4
@@ -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
- p AcpcPokerPlayerProxy::VERSION
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
@@ -1,3 +1,3 @@
1
1
  module AcpcPokerPlayerProxy
2
- VERSION = "1.0.1"
2
+ VERSION = "1.1.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acpc_poker_player_proxy
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dustin Morrill