OSDN Git Service

Remove a debug message
[shogi-server/shogi-server.git] / test / TC_game_least_0.rb
index 3429f07..3506eb5 100644 (file)
@@ -7,6 +7,7 @@ require 'shogi_server/player'
 
 $options = {}
 $options["least-time-per-move"] = 0
+$options["max-moves"] = 256
 
 def log_message(str)
   $stderr.puts str
@@ -41,7 +42,7 @@ class TestGameWithLeastZero < Test::Unit::TestCase
 
     p1_out = <<EOF
 BEGIN Game_Summary
-Protocol_Version:1.1
+Protocol_Version:1.2
 Protocol_Mode:Server
 Format:Shogi 1.0
 Declaration:Jishogi 1.1
@@ -51,10 +52,12 @@ Name-:p2
 Your_Turn:+
 Rematch_On_Draw:NO
 To_Move:+
+Max_Moves:#{$options["max-moves"]}
 BEGIN Time
 Time_Unit:1sec
 Total_Time:1500
 Byoyomi:10
+Increment:0
 Least_Time_Per_Move:#{$options["least-time-per-move"]}
 END Time
 BEGIN Position
@@ -75,7 +78,7 @@ EOF
 
     p2_out = <<EOF
 BEGIN Game_Summary
-Protocol_Version:1.1
+Protocol_Version:1.2
 Protocol_Mode:Server
 Format:Shogi 1.0
 Declaration:Jishogi 1.1
@@ -85,10 +88,12 @@ Name-:p2
 Your_Turn:-
 Rematch_On_Draw:NO
 To_Move:+
+Max_Moves:#{$options["max-moves"]}
 BEGIN Time
 Time_Unit:1sec
 Total_Time:1500
 Byoyomi:10
+Increment:0
 Least_Time_Per_Move:#{$options["least-time-per-move"]}
 END Time
 BEGIN Position
@@ -113,6 +118,8 @@ EOF
 V2
 N+p1
 N-p2
+'Max_Moves:#{$options["max-moves"]}
+'Least_Time_Per_Move:#{$options["least-time-per-move"]}
 $EVENT:#{game.game_id}
 P1-KY-KE-GI-KI-OU-KI-GI-KE-KY
 P2 * -HI *  *  *  *  * -KA * 
@@ -143,7 +150,7 @@ EOF
 
     p1_out = <<EOF
 BEGIN Game_Summary
-Protocol_Version:1.1
+Protocol_Version:1.2
 Protocol_Mode:Server
 Format:Shogi 1.0
 Declaration:Jishogi 1.1
@@ -153,10 +160,12 @@ Name-:p2
 Your_Turn:+
 Rematch_On_Draw:NO
 To_Move:-
+Max_Moves:#{$options["max-moves"]}
 BEGIN Time
 Time_Unit:1sec
 Total_Time:1500
 Byoyomi:10
+Increment:0
 Least_Time_Per_Move:#{$options["least-time-per-move"]}
 END Time
 BEGIN Position
@@ -178,7 +187,7 @@ EOF
 
     p2_out = <<EOF
 BEGIN Game_Summary
-Protocol_Version:1.1
+Protocol_Version:1.2
 Protocol_Mode:Server
 Format:Shogi 1.0
 Declaration:Jishogi 1.1
@@ -188,10 +197,12 @@ Name-:p2
 Your_Turn:-
 Rematch_On_Draw:NO
 To_Move:-
+Max_Moves:#{$options["max-moves"]}
 BEGIN Time
 Time_Unit:1sec
 Total_Time:1500
 Byoyomi:10
+Increment:0
 Least_Time_Per_Move:#{$options["least-time-per-move"]}
 END Time
 BEGIN Position
@@ -217,6 +228,8 @@ EOF
 V2
 N+p1
 N-p2
+'Max_Moves:#{$options["max-moves"]}
+'Least_Time_Per_Move:#{$options["least-time-per-move"]}
 $EVENT:#{game.game_id}
 P1-KY-KE-GI-KI-OU-KI-GI-KE-KY
 P2 * -HI *  *  *  *  * -KA * 
@@ -250,7 +263,7 @@ EOF
 
     p1_out = <<EOF
 BEGIN Game_Summary
-Protocol_Version:1.1
+Protocol_Version:1.2
 Protocol_Mode:Server
 Format:Shogi 1.0
 Declaration:Jishogi 1.1
@@ -260,10 +273,12 @@ Name-:p2
 Your_Turn:+
 Rematch_On_Draw:NO
 To_Move:+
+Max_Moves:#{$options["max-moves"]}
 BEGIN Time
 Time_Unit:1sec
 Total_Time:1500
 Byoyomi:10
+Increment:0
 Least_Time_Per_Move:#{$options["least-time-per-move"]}
 END Time
 BEGIN Position
@@ -286,7 +301,7 @@ EOF
 
     p2_out = <<EOF
 BEGIN Game_Summary
-Protocol_Version:1.1
+Protocol_Version:1.2
 Protocol_Mode:Server
 Format:Shogi 1.0
 Declaration:Jishogi 1.1
@@ -296,10 +311,12 @@ Name-:p2
 Your_Turn:-
 Rematch_On_Draw:NO
 To_Move:+
+Max_Moves:#{$options["max-moves"]}
 BEGIN Time
 Time_Unit:1sec
 Total_Time:1500
 Byoyomi:10
+Increment:0
 Least_Time_Per_Move:#{$options["least-time-per-move"]}
 END Time
 BEGIN Position
@@ -326,6 +343,8 @@ EOF
 V2
 N+p1
 N-p2
+'Max_Moves:#{$options["max-moves"]}
+'Least_Time_Per_Move:#{$options["least-time-per-move"]}
 $EVENT:#{game.game_id}
 P1-KY-KE-GI-KI-OU-KI-GI-KE-KY
 P2 * -HI *  *  *  *  * -KA *