shogi-server source
Révision | 08ed00749c918df719407c0d8de72deac7cef3da (tree) |
---|---|
l'heure | 2015-12-13 17:55:14 |
Auteur | Daigo Moriwaki <daigo@debi...> |
Commiter | Daigo Moriwaki |
Merge branch '201512-maxmoves'
@@ -6,12 +6,12 @@ doc: clean | ||
6 | 6 | |
7 | 7 | .PHONY: test-run |
8 | 8 | test-run: |
9 | - ./shogi-server --floodgate-games floodgate-900-0,floodgate-3600-0 hoge 4000 | |
9 | + ./shogi-server --floodgate-games floodgate-600-10,floodgate-3600-0 hoge 4000 | |
10 | 10 | |
11 | 11 | |
12 | 12 | .PHONY: test-run-daemon |
13 | 13 | test-run-daemon: |
14 | - ./shogi-server --floodgate-games floodgate-900-0,floodgate-3600-0 --daemon . --pid-file ./shogi-server.pid --player-log-dir ./player-logs hoge 4000 | |
14 | + ./shogi-server --floodgate-games floodgate-600-10,floodgate-3600-0 --daemon . --pid-file ./shogi-server.pid --player-log-dir ./player-logs hoge 4000 | |
15 | 15 | |
16 | 16 | .PHONY: stop-daemn |
17 | 17 | stop-daemon: |
@@ -1,3 +1,24 @@ | ||
1 | +2015-12-13 Daigo Moriwaki <daigo at debian dot org> | |
2 | + | |
3 | + * [shogi-server] Enhance capability of Floodgate configuration file | |
4 | + - New parameter: Max_Moves, defined in the CSA protocol | |
5 | + ex. set Max_Moves 256 | |
6 | + - New parameter: Least_Time_Per_Move, defined in the CSA protocol | |
7 | + ex. set Least_Time_Per_Move 0 | |
8 | + - Proposed messages distributed to each player upon starting a new | |
9 | + game will include Max_Moves as well as Least_Time_Per_Move. | |
10 | + - CSA files produced by the server will include settings of | |
11 | + Max_Moves and Least_Time_Per_Move in comment lines as follows: | |
12 | + 'Max_Moves:256 | |
13 | + 'Least_Time_Per_Move:0 | |
14 | + - The official Shogi-server on wdoor.c.u-tokyo.ac.jp will | |
15 | + be running with different parameters, depending on game names. | |
16 | + a) Max_Moves will be 256 for floodgate-600-10 games; | |
17 | + otherwise, 0. | |
18 | + b) Least_Time_Per_Move will be 0 for floodgate-600-10 games; | |
19 | + otherwise 1. | |
20 | + (Closes: #35839) | |
21 | + | |
1 | 22 | 2015-11-27 Daigo Moriwaki <daigo at debian dot org> |
2 | 23 | |
3 | 24 | * [shogi-server] shogi_server/time_clock.rb: |
@@ -278,10 +278,10 @@ def check_command_line | ||
278 | 278 | $options["floodgate-history"] = nil |
279 | 279 | end |
280 | 280 | |
281 | - $options["max-moves"] ||= 256 | |
281 | + $options["max-moves"] ||= ShogiServer::Default_Max_Moves | |
282 | 282 | $options["max-moves"] = $options["max-moves"].to_i |
283 | 283 | |
284 | - $options["least-time-per-move"] ||= 0 | |
284 | + $options["least-time-per-move"] ||= ShogiServer::Default_Least_Time_Per_Move | |
285 | 285 | $options["least-time-per-move"] = $options["least-time-per-move"].to_i |
286 | 286 | end |
287 | 287 |
@@ -48,9 +48,11 @@ module ShogiServer # for a namespace | ||
48 | 48 | Max_Identifier_Length = 32 |
49 | 49 | Default_Timeout = 60 # for single socket operation |
50 | 50 | Default_Game_Name = "default-1500-0" |
51 | +Default_Max_Moves = 256 | |
52 | +Default_Least_Time_Per_Move = 0 | |
51 | 53 | One_Time = 10 |
52 | 54 | Login_Time = 300 # time for LOGIN |
53 | -Revision = "20150117" | |
55 | +Revision = "20151213" | |
54 | 56 | |
55 | 57 | RELOAD_FILES = ["shogi_server/league/floodgate.rb", |
56 | 58 | "shogi_server/league/persistent.rb", |
@@ -84,18 +84,25 @@ EOF | ||
84 | 84 | end |
85 | 85 | |
86 | 86 | |
87 | - def initialize(move_count=0) | |
87 | + def initialize(options={}) | |
88 | 88 | @sente_hands = Array::new |
89 | 89 | @gote_hands = Array::new |
90 | 90 | @history = Hash::new(0) |
91 | 91 | @sente_history = Hash::new(0) |
92 | 92 | @gote_history = Hash::new(0) |
93 | 93 | @array = [[], [], [], [], [], [], [], [], [], []] |
94 | - @move_count = move_count | |
94 | + @move_count = 0 | |
95 | 95 | @teban = nil # black => true, white => false |
96 | 96 | @initial_moves = [] |
97 | 97 | @move = nil |
98 | 98 | @ous = [nil, nil] # keep OU pieces of Sente and Gote |
99 | + | |
100 | + @max_moves = options[:max_moves] || | |
101 | + ($options && $options["max-moves"]) || | |
102 | + Default_Max_Moves | |
103 | + @least_time_per_move = options[:least_time_per_move] || | |
104 | + ($options && $options["least-time-per-move"]) || | |
105 | + Default_Least_Time_Per_Move | |
99 | 106 | end |
100 | 107 | attr_accessor :array, :sente_hands, :gote_hands, :history, :sente_history, :gote_history, :teban |
101 | 108 | attr_reader :move_count |
@@ -110,6 +117,12 @@ EOF | ||
110 | 117 | # |
111 | 118 | attr_reader :move |
112 | 119 | |
120 | + # Max_Moves of the CSA protocol | |
121 | + attr_reader :max_moves | |
122 | + | |
123 | + # Least_Time_Per_Move of the CSA protocol | |
124 | + attr_reader :least_time_per_move | |
125 | + | |
113 | 126 | # See if self equals rhs, including a logical board position (i.e. |
114 | 127 | # not see object IDs) and sennichite stuff. |
115 | 128 | # |
@@ -717,8 +730,7 @@ EOF | ||
717 | 730 | # New rule that CSA introduced in November 2014. |
718 | 731 | # If a game with 256 plies does not end, make the game a draw. |
719 | 732 | # When running test cases $options might be nil. |
720 | - if $options && $options["max-moves"] && | |
721 | - $options["max-moves"] > 0 && @move_count >= $options["max-moves"] | |
733 | + if @max_moves > 0 && @move_count >= @max_moves | |
722 | 734 | return :max_moves |
723 | 735 | end |
724 | 736 |
@@ -71,7 +71,7 @@ class Game | ||
71 | 71 | @total_time = $1.to_i |
72 | 72 | @byoyomi = $2.to_i |
73 | 73 | |
74 | - @time_clock = TimeClock::factory($options["least-time-per-move"], @game_name) | |
74 | + @time_clock = TimeClock::factory(board.least_time_per_move, @game_name) | |
75 | 75 | end |
76 | 76 | |
77 | 77 | if (player0.sente) |
@@ -325,6 +325,8 @@ class Game | ||
325 | 325 | @fh.puts("V2") |
326 | 326 | @fh.puts("N+#{@sente.name}") |
327 | 327 | @fh.puts("N-#{@gote.name}") |
328 | + @fh.puts("'Max_Moves:#{@board.max_moves}") | |
329 | + @fh.puts("'Least_Time_Per_Move:#{@board.least_time_per_move}") | |
328 | 330 | @fh.puts("$EVENT:#{@game_id}") |
329 | 331 | |
330 | 332 | @sente.write_safe(propose_message("+")) |
@@ -371,11 +373,12 @@ Name+:#{@sente.name} | ||
371 | 373 | Name-:#{@gote.name} |
372 | 374 | Rematch_On_Draw:NO |
373 | 375 | To_Move:+ |
376 | +Max_Moves:#{@board.max_moves} | |
374 | 377 | BEGIN Time |
375 | 378 | Time_Unit:#{@time_clock.time_unit} |
376 | 379 | Total_Time:#{@total_time} |
377 | 380 | Byoyomi:#{@byoyomi} |
378 | -Least_Time_Per_Move:#{$options["least-time-per-move"]} | |
381 | +Least_Time_Per_Move:#{@board.least_time_per_move} | |
379 | 382 | Remaining_Time+:#{@sente.mytime} |
380 | 383 | Remaining_Time-:#{@gote.mytime} |
381 | 384 | Last_Move:#{@last_move} |
@@ -405,11 +408,12 @@ Name-:#{@gote.name} | ||
405 | 408 | Your_Turn:#{sg_flag} |
406 | 409 | Rematch_On_Draw:NO |
407 | 410 | To_Move:#{@board.teban ? "+" : "-"} |
411 | +Max_Moves:#{@board.max_moves} | |
408 | 412 | BEGIN Time |
409 | 413 | Time_Unit:#{@time_clock.time_unit} |
410 | 414 | Total_Time:#{@total_time} |
411 | 415 | Byoyomi:#{@byoyomi} |
412 | -Least_Time_Per_Move:#{$options["least-time-per-move"]} | |
416 | +Least_Time_Per_Move:#{@board.least_time_per_move} | |
413 | 417 | END Time |
414 | 418 | BEGIN Position |
415 | 419 | #{@board.initial_string.chomp} |
@@ -36,8 +36,10 @@ class League | ||
36 | 36 | # Options will be updated by NextTimeGenerator and then passed to a |
37 | 37 | # pairing factory. |
38 | 38 | @options = {} |
39 | - @options[:pairing_factory] = hash[:pairing_factory] || "default_factory" | |
40 | - @options[:sacrifice] = hash[:sacrifice] || "gps500+e293220e3f8a3e59f79f6b0efffaa931" | |
39 | + @options[:pairing_factory] = hash[:pairing_factory] || "default_factory" | |
40 | + @options[:sacrifice] = hash[:sacrifice] || "gps500+e293220e3f8a3e59f79f6b0efffaa931" | |
41 | + @options[:max_moves] = hash[:max_moves] || Default_Max_Moves | |
42 | + @options[:least_time_per_move] = hash[:least_time_per_move] || Default_Least_Time_Per_Move | |
41 | 43 | charge if @next_time.nil? |
42 | 44 | end |
43 | 45 |
@@ -53,12 +55,22 @@ class League | ||
53 | 55 | return @options[:sacrifice] |
54 | 56 | end |
55 | 57 | |
58 | + def max_moves | |
59 | + return @options[:max_moves] | |
60 | + end | |
61 | + | |
62 | + def least_time_per_move | |
63 | + return @options[:least_time_per_move] | |
64 | + end | |
65 | + | |
56 | 66 | def charge |
57 | 67 | ntg = NextTimeGenerator.factory(@game_name) |
58 | 68 | if ntg |
59 | 69 | @next_time = ntg.call(Time.now) |
60 | - @options[:pairing_factory] = ntg.pairing_factory | |
61 | - @options[:sacrifice] = ntg.sacrifice | |
70 | + @options[:pairing_factory] = ntg.pairing_factory | |
71 | + @options[:sacrifice] = ntg.sacrifice | |
72 | + @options[:max_moves] = ntg.max_moves | |
73 | + @options[:least_time_per_move] = ntg.least_time_per_move | |
62 | 74 | else |
63 | 75 | @next_time = nil |
64 | 76 | end |
@@ -80,7 +92,7 @@ class League | ||
80 | 92 | def match_game |
81 | 93 | log_message("Starting Floodgate games...: %s, %s" % [@game_name, @options]) |
82 | 94 | logics = Pairing.send(@options[:pairing_factory], @options) |
83 | - Pairing.match(select_players(), logics) | |
95 | + Pairing.match(select_players(), logics, @options) | |
84 | 96 | end |
85 | 97 | |
86 | 98 | # |
@@ -110,12 +122,16 @@ class League | ||
110 | 122 | |
111 | 123 | attr_reader :pairing_factory |
112 | 124 | attr_reader :sacrifice |
125 | + attr_reader :max_moves | |
126 | + attr_reader :least_time_per_move | |
113 | 127 | |
114 | 128 | # Constructor. |
115 | 129 | # |
116 | 130 | def initialize |
117 | - @pairing_factory = "default_factory" | |
118 | - @sacrifice = "gps500+e293220e3f8a3e59f79f6b0efffaa931" | |
131 | + @pairing_factory = "default_factory" | |
132 | + @sacrifice = "gps500+e293220e3f8a3e59f79f6b0efffaa931" | |
133 | + @max_moves = Default_Max_Moves | |
134 | + @least_time_per_move = Default_Least_Time_Per_Move | |
119 | 135 | end |
120 | 136 | end |
121 | 137 |
@@ -146,6 +162,12 @@ class League | ||
146 | 162 | # * sacrifice: |
147 | 163 | # Specifies a sacrificed player. |
148 | 164 | # ex. set sacrifice gps500+e293220e3f8a3e59f79f6b0efffaa931 |
165 | + # * max_moves: | |
166 | + # Sepcifies a number of max moves | |
167 | + # ex. set max_moves 256 | |
168 | + # * least_time_per_move: | |
169 | + # Sepcifies a least time per move | |
170 | + # ex. set least_time_per_move 0 | |
149 | 171 | # |
150 | 172 | class NextTimeGeneratorConfig < AbstructNextTimeGenerator |
151 | 173 |
@@ -170,6 +192,10 @@ class League | ||
170 | 192 | @pairing_factory = $1.chomp |
171 | 193 | when %r!^\s*set\s+sacrifice\s+(.*)! |
172 | 194 | @sacrifice = $1.chomp |
195 | + when %r!^\s*set\s+max_moves\s+(\d+)! | |
196 | + @max_moves = $1.chomp.to_i | |
197 | + when %r!^\s*set\s+least_time_per_move\s+(\d+)! | |
198 | + @least_time_per_move = $1.chomp.to_i | |
173 | 199 | when %r!^\s*(\w+)\s+(\d{1,2}):(\d{1,2})! |
174 | 200 | dow, hour, minute = $1, $2.to_i, $3.to_i |
175 | 201 | dow_index = ::ShogiServer::parse_dow(dow) |
@@ -73,11 +73,12 @@ module ShogiServer | ||
73 | 73 | # |
74 | 74 | def regenerate_leagues(next_instances) |
75 | 75 | leagues = next_instances.collect do |prev| |
76 | - log_message("Regenerating a floodgate league...: %s %s %s %s" % | |
77 | - [prev.game_name, prev.next_time, prev.pairing_factory, prev.sacrifice]) | |
76 | + log_message("Regenerating a floodgate league...: %s %s %s %s %d %d" % | |
77 | + [prev.game_name, prev.next_time, prev.pairing_factory, prev.sacrifice, prev.max_moves, prev.least_time_per_move]) | |
78 | 78 | floodgate = ShogiServer::League::Floodgate.new($league, |
79 | 79 | {:game_name => prev.game_name, :next_time => prev.next_time, |
80 | - :pairing_factory => prev.pairing_factory, :sacrifice => prev.sacrifice}) | |
80 | + :pairing_factory => prev.pairing_factory, :sacrifice => prev.sacrifice, | |
81 | + :max_moves => prev.max_moves, :least_time_per_move => prev.least_time_per_move}) | |
81 | 82 | end |
82 | 83 | floodgate_reload_log(leagues) |
83 | 84 | return leagues |
@@ -69,14 +69,22 @@ module ShogiServer | ||
69 | 69 | StartGameWithoutHumans.new] |
70 | 70 | end |
71 | 71 | |
72 | - def match(players, logics) | |
72 | + def match(players, logics, options) | |
73 | 73 | logics.inject(players) do |result, item| |
74 | + item.set_options(options) | |
74 | 75 | item.match(result) |
75 | 76 | result |
76 | 77 | end |
77 | 78 | end |
78 | 79 | end # class << self |
79 | 80 | |
81 | + def initialize | |
82 | + @options = {} | |
83 | + end | |
84 | + | |
85 | + def set_options(options) | |
86 | + @options.merge!(options) | |
87 | + end | |
80 | 88 | |
81 | 89 | # Make matches among players. |
82 | 90 | # @param players an array of players, which should be updated destructively |
@@ -129,7 +137,7 @@ module ShogiServer | ||
129 | 137 | log_message("Floodgate: Starting a game: BLACK %s vs WHITE %s" % [p1.name, p2.name]) |
130 | 138 | p1.sente = true |
131 | 139 | p2.sente = false |
132 | - board = Board.new | |
140 | + board = Board.new(@options) | |
133 | 141 | board.initial |
134 | 142 | Game.new(p1.game_name, p1, p2, board) |
135 | 143 | end |
@@ -249,4 +249,20 @@ class TestNextTimeGeneratorConfig < Test::Unit::TestCase | ||
249 | 249 | assert_equal Time.parse("10-06-2010 22:00"), ntc.call(now) |
250 | 250 | assert_equal("yowai_gps+95908f6c18338f5340371f71523fc5e3", ntc.sacrifice) |
251 | 251 | end |
252 | + | |
253 | + def test_default_max_moves | |
254 | + now = DateTime.new(2010, 6, 10, 21, 59, 59) # Thu | |
255 | + lines = %w(Thu\ 22:00) | |
256 | + ntc = ShogiServer::League::Floodgate::NextTimeGeneratorConfig.new lines | |
257 | + assert_equal Time.parse("10-06-2010 22:00"), ntc.call(now) | |
258 | + assert_equal(256, ntc.max_moves) | |
259 | + end | |
260 | + | |
261 | + def test_read_max_moves | |
262 | + now = DateTime.new(2010, 6, 10, 21, 59, 59) # Thu | |
263 | + lines = %w(set\ max_moves\ 200 Thu\ 22:00) | |
264 | + ntc = ShogiServer::League::Floodgate::NextTimeGeneratorConfig.new lines | |
265 | + assert_equal Time.parse("10-06-2010 22:00"), ntc.call(now) | |
266 | + assert_equal(200, ntc.max_moves) | |
267 | + end | |
252 | 268 | end |
@@ -36,6 +36,8 @@ class TestClientAtmark < BaseClient | ||
36 | 36 | V2 |
37 | 37 | N+atmark_B@p1 |
38 | 38 | N-atmark_W@p2 |
39 | +'Max_Moves:256 | |
40 | +'Least_Time_Per_Move:0 | |
39 | 41 | P1-KY-KE-GI-KI-OU-KI-GI-KE-KY |
40 | 42 | P2 * -HI * * * * * -KA * |
41 | 43 | P3-FU-FU-FU-FU-FU-FU-FU-FU-FU |
@@ -103,6 +105,8 @@ class TestHandicappedGame < BaseClient | ||
103 | 105 | V2 |
104 | 106 | N+hc2p_hoge_B |
105 | 107 | N-hc2p_hoge_W |
108 | +'Max_Moves:256 | |
109 | +'Least_Time_Per_Move:0 | |
106 | 110 | P1-KY-KE-GI-KI-OU-KI-GI-KE-KY |
107 | 111 | P2 * -HI * * * * * -KA * |
108 | 112 | P3-FU-FU-FU-FU-FU-FU-FU-FU-FU |
@@ -7,6 +7,7 @@ require 'shogi_server/player' | ||
7 | 7 | |
8 | 8 | $options = {} |
9 | 9 | $options["least-time-per-move"] = 1 |
10 | +$options["max-moves"] = 0 | |
10 | 11 | |
11 | 12 | def log_message(str) |
12 | 13 | $stderr.puts str |
@@ -51,6 +52,7 @@ Name-:p2 | ||
51 | 52 | Your_Turn:+ |
52 | 53 | Rematch_On_Draw:NO |
53 | 54 | To_Move:+ |
55 | +Max_Moves:#{$options["max-moves"]} | |
54 | 56 | BEGIN Time |
55 | 57 | Time_Unit:1sec |
56 | 58 | Total_Time:1500 |
@@ -85,6 +87,7 @@ Name-:p2 | ||
85 | 87 | Your_Turn:- |
86 | 88 | Rematch_On_Draw:NO |
87 | 89 | To_Move:+ |
90 | +Max_Moves:#{$options["max-moves"]} | |
88 | 91 | BEGIN Time |
89 | 92 | Time_Unit:1sec |
90 | 93 | Total_Time:1500 |
@@ -113,6 +116,8 @@ EOF | ||
113 | 116 | V2 |
114 | 117 | N+p1 |
115 | 118 | N-p2 |
119 | +'Max_Moves:#{$options["max-moves"]} | |
120 | +'Least_Time_Per_Move:#{$options["least-time-per-move"]} | |
116 | 121 | $EVENT:#{game.game_id} |
117 | 122 | P1-KY-KE-GI-KI-OU-KI-GI-KE-KY |
118 | 123 | P2 * -HI * * * * * -KA * |
@@ -153,6 +158,7 @@ Name-:p2 | ||
153 | 158 | Your_Turn:+ |
154 | 159 | Rematch_On_Draw:NO |
155 | 160 | To_Move:- |
161 | +Max_Moves:#{$options["max-moves"]} | |
156 | 162 | BEGIN Time |
157 | 163 | Time_Unit:1sec |
158 | 164 | Total_Time:1500 |
@@ -188,6 +194,7 @@ Name-:p2 | ||
188 | 194 | Your_Turn:- |
189 | 195 | Rematch_On_Draw:NO |
190 | 196 | To_Move:- |
197 | +Max_Moves:#{$options["max-moves"]} | |
191 | 198 | BEGIN Time |
192 | 199 | Time_Unit:1sec |
193 | 200 | Total_Time:1500 |
@@ -217,6 +224,8 @@ EOF | ||
217 | 224 | V2 |
218 | 225 | N+p1 |
219 | 226 | N-p2 |
227 | +'Max_Moves:#{$options["max-moves"]} | |
228 | +'Least_Time_Per_Move:#{$options["least-time-per-move"]} | |
220 | 229 | $EVENT:#{game.game_id} |
221 | 230 | P1-KY-KE-GI-KI-OU-KI-GI-KE-KY |
222 | 231 | P2 * -HI * * * * * -KA * |
@@ -260,6 +269,7 @@ Name-:p2 | ||
260 | 269 | Your_Turn:+ |
261 | 270 | Rematch_On_Draw:NO |
262 | 271 | To_Move:+ |
272 | +Max_Moves:#{$options["max-moves"]} | |
263 | 273 | BEGIN Time |
264 | 274 | Time_Unit:1sec |
265 | 275 | Total_Time:1500 |
@@ -296,6 +306,7 @@ Name-:p2 | ||
296 | 306 | Your_Turn:- |
297 | 307 | Rematch_On_Draw:NO |
298 | 308 | To_Move:+ |
309 | +Max_Moves:#{$options["max-moves"]} | |
299 | 310 | BEGIN Time |
300 | 311 | Time_Unit:1sec |
301 | 312 | Total_Time:1500 |
@@ -326,6 +337,8 @@ EOF | ||
326 | 337 | V2 |
327 | 338 | N+p1 |
328 | 339 | N-p2 |
340 | +'Max_Moves:#{$options["max-moves"]} | |
341 | +'Least_Time_Per_Move:#{$options["least-time-per-move"]} | |
329 | 342 | $EVENT:#{game.game_id} |
330 | 343 | P1-KY-KE-GI-KI-OU-KI-GI-KE-KY |
331 | 344 | P2 * -HI * * * * * -KA * |
@@ -7,6 +7,7 @@ require 'shogi_server/player' | ||
7 | 7 | |
8 | 8 | $options = {} |
9 | 9 | $options["least-time-per-move"] = 0 |
10 | +$options["max-moves"] = 256 | |
10 | 11 | |
11 | 12 | def log_message(str) |
12 | 13 | $stderr.puts str |
@@ -51,6 +52,7 @@ Name-:p2 | ||
51 | 52 | Your_Turn:+ |
52 | 53 | Rematch_On_Draw:NO |
53 | 54 | To_Move:+ |
55 | +Max_Moves:#{$options["max-moves"]} | |
54 | 56 | BEGIN Time |
55 | 57 | Time_Unit:1sec |
56 | 58 | Total_Time:1500 |
@@ -85,6 +87,7 @@ Name-:p2 | ||
85 | 87 | Your_Turn:- |
86 | 88 | Rematch_On_Draw:NO |
87 | 89 | To_Move:+ |
90 | +Max_Moves:#{$options["max-moves"]} | |
88 | 91 | BEGIN Time |
89 | 92 | Time_Unit:1sec |
90 | 93 | Total_Time:1500 |
@@ -113,6 +116,8 @@ EOF | ||
113 | 116 | V2 |
114 | 117 | N+p1 |
115 | 118 | N-p2 |
119 | +'Max_Moves:#{$options["max-moves"]} | |
120 | +'Least_Time_Per_Move:#{$options["least-time-per-move"]} | |
116 | 121 | $EVENT:#{game.game_id} |
117 | 122 | P1-KY-KE-GI-KI-OU-KI-GI-KE-KY |
118 | 123 | P2 * -HI * * * * * -KA * |
@@ -153,6 +158,7 @@ Name-:p2 | ||
153 | 158 | Your_Turn:+ |
154 | 159 | Rematch_On_Draw:NO |
155 | 160 | To_Move:- |
161 | +Max_Moves:#{$options["max-moves"]} | |
156 | 162 | BEGIN Time |
157 | 163 | Time_Unit:1sec |
158 | 164 | Total_Time:1500 |
@@ -188,6 +194,7 @@ Name-:p2 | ||
188 | 194 | Your_Turn:- |
189 | 195 | Rematch_On_Draw:NO |
190 | 196 | To_Move:- |
197 | +Max_Moves:#{$options["max-moves"]} | |
191 | 198 | BEGIN Time |
192 | 199 | Time_Unit:1sec |
193 | 200 | Total_Time:1500 |
@@ -217,6 +224,8 @@ EOF | ||
217 | 224 | V2 |
218 | 225 | N+p1 |
219 | 226 | N-p2 |
227 | +'Max_Moves:#{$options["max-moves"]} | |
228 | +'Least_Time_Per_Move:#{$options["least-time-per-move"]} | |
220 | 229 | $EVENT:#{game.game_id} |
221 | 230 | P1-KY-KE-GI-KI-OU-KI-GI-KE-KY |
222 | 231 | P2 * -HI * * * * * -KA * |
@@ -260,6 +269,7 @@ Name-:p2 | ||
260 | 269 | Your_Turn:+ |
261 | 270 | Rematch_On_Draw:NO |
262 | 271 | To_Move:+ |
272 | +Max_Moves:#{$options["max-moves"]} | |
263 | 273 | BEGIN Time |
264 | 274 | Time_Unit:1sec |
265 | 275 | Total_Time:1500 |
@@ -296,6 +306,7 @@ Name-:p2 | ||
296 | 306 | Your_Turn:- |
297 | 307 | Rematch_On_Draw:NO |
298 | 308 | To_Move:+ |
309 | +Max_Moves:#{$options["max-moves"]} | |
299 | 310 | BEGIN Time |
300 | 311 | Time_Unit:1sec |
301 | 312 | Total_Time:1500 |
@@ -326,6 +337,8 @@ EOF | ||
326 | 337 | V2 |
327 | 338 | N+p1 |
328 | 339 | N-p2 |
340 | +'Max_Moves:#{$options["max-moves"]} | |
341 | +'Least_Time_Per_Move:#{$options["least-time-per-move"]} | |
329 | 342 | $EVENT:#{game.game_id} |
330 | 343 | P1-KY-KE-GI-KI-OU-KI-GI-KE-KY |
331 | 344 | P2 * -HI * * * * * -KA * |