• R/O
  • HTTP
  • SSH
  • HTTPS

提交

标签
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

shogi-server source


Commit MetaInfo

修订版310d29371b9fea5ea71cdb26a393df2dfefc5b57 (tree)
时间2004-07-12 00:29:53
作者nabeken <nabeken@b8c6...>
Commiternabeken

Log Message

game format changed

更改概述

差异

--- a/shogi-server
+++ b/shogi-server
@@ -21,7 +21,7 @@ Max_Write_Queue_Size = 1000
2121 Max_Identifier_Length = 32
2222 Default_Timeout = 60 # for single socket operation
2323
24-Default_Game_Name = "default:1500:0"
24+Default_Game_Name = "default-1500-0"
2525
2626 One_Time = 10
2727 Least_Time_Per_Move = 1
@@ -162,6 +162,7 @@ class Player
162162
163163 def to_s
164164 if ((status == "game_waiting") ||
165+ (status == "start_waiting") ||
165166 (status == "agree_waiting") ||
166167 (status == "game"))
167168 if (@sente)
@@ -267,7 +268,7 @@ class Player
267268 end
268269 when /^%%HELP/
269270 write_help
270- when /^%%GAME\s+(\S+)\s+([\+\-]+)$/
271+ when /^%%GAME\s+(\S+)\s+([\+\-])/
271272 game_name = $1
272273 sente_str = $2
273274 if (! good_game_name?(game_name))
@@ -574,7 +575,7 @@ class Game
574575 def initialize(game_name, player0, player1)
575576 @monitors = Array::new
576577 @game_name = game_name
577- if (@game_name =~ /:(\d+):(\d+)/)
578+ if (@game_name =~ /-(\d+)-(\d+)$/)
578579 @total_time = $1.to_i
579580 @byoyomi = $2.to_i
580581 end
@@ -995,7 +996,7 @@ def parse_command_line
995996 end
996997
997998 def good_game_name?(str)
998- if ((str =~ /^(.+):\d+:\d+$/) &&
999+ if ((str =~ /^(.+)-\d+-\d+$/) &&
9991000 (good_identifier?($1)))
10001001 return true
10011002 else