acpc_poker_player_proxy 0.0.2 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +9 -29
- data/acpc_poker_player_proxy.gemspec +12 -11
- data/lib/acpc_poker_player_proxy/player_proxy.rb +8 -6
- data/lib/acpc_poker_player_proxy/version.rb +1 -1
- data/spec/coverage/index.html +1 -1
- data/spec/player_proxy_spec.rb +227 -0
- data/spec/support/spec_helper.rb +25 -8
- metadata +55 -50
- data/spec/player_proxy_limit_spec.rb +0 -367
- data/spec/player_proxy_nolimit_spec.rb +0 -547
- data/spec/support/dealer_data.rb +0 -140058
- data/spec/support/dealer_data.two_player_limit.rb +0 -13593
- data/spec/support/rearrange_dealer_data.rb +0 -54
- data/tasks.rb +0 -10
@@ -1,54 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require 'acpc_poker_types/match_state'
|
4
|
-
|
5
|
-
require File.expand_path('../dealer_data', __FILE__)
|
6
|
-
|
7
|
-
include DealerData
|
8
|
-
|
9
|
-
File.open('dealer_data.two_player_limit.rb', 'w') do |file|
|
10
|
-
|
11
|
-
file.puts "
|
12
|
-
require 'acpc_dealer'
|
13
|
-
|
14
|
-
require File.expand_path('../match_definition', __FILE__)
|
15
|
-
|
16
|
-
module DealerData
|
17
|
-
@data = {} unless @data"
|
18
|
-
|
19
|
-
DealerData::DATA.each do |num_players, data_by_num_players|
|
20
|
-
((0..(num_players-1)).map{ |i| (i+1).to_s }).each do |seat|
|
21
|
-
data_by_num_players.each do |type, data_by_type|
|
22
|
-
next unless type == :limit && num_players == 2
|
23
|
-
|
24
|
-
|
25
|
-
data_by_type[:actions].each do |turn|
|
26
|
-
|
27
|
-
match_state = MatchState.parse turn[:to_players][seat]
|
28
|
-
file.puts "
|
29
|
-
@data[MatchDefinition.new(
|
30
|
-
'2player_limit_#{match_state.hand_number}',
|
31
|
-
AcpcDealer::GAME_DEFINITION_FILE_PATHS[:two_player][:limit],
|
32
|
-
100,
|
33
|
-
['p1', 'p2'],
|
34
|
-
0
|
35
|
-
)] = {
|
36
|
-
hands: [
|
37
|
-
{
|
38
|
-
turns: " if match_state.hand_number == 0 && match_state.first_state_of_first_round?
|
39
|
-
|
40
|
-
file.puts "#{turn.inspect},"
|
41
|
-
|
42
|
-
file.puts "
|
43
|
-
],#{###################}
|
44
|
-
final_balances: #{data_by_type[:results][match_state.hand_number]},
|
45
|
-
|
46
|
-
}" if match_state.hand_ended?
|
47
|
-
end
|
48
|
-
end
|
49
|
-
end
|
50
|
-
end
|
51
|
-
|
52
|
-
file.puts "
|
53
|
-
end"
|
54
|
-
end
|