📄 start
字号:
#!/bin/csh -f
set CLIENT_CONF = "tsinghuaeolus.conf"
set SERVER_CONF = "server.conf"
set COACH_CONF = "coach.conf"
set CLIENT = "../src/tsinghuaeolus"
set COACH = ""
set NUMBER = 11 # Number of Clients
set HOST = "localhost"
set GOALIE_NUM = "1"
set TEAMNAME = "TsinghuAeolus"
set coach = 0
if ($# >= 1 && "$1" == "-c") then
set coach = 1
shift
endif
if ($# >= 1 && "$1" != "-p") then
set HOST = $1
shift
endif
if ($# >= 1 && "$1" != "-p") then
set TEAMNAME = $1
shift
endif
set playerlist =
set j = 1
while ($j <= $NUMBER)
set playerlist = "$playerlist $j"
@ j = $j + 1
end
set error = 0
if ($# >= 1) then
if ("$1" == "-p") then
shift
set playerlist =
foreach i ($*)
if ("$i" =~ [0-9]*) then
set playerlist = "$playerlist $i"
else
set error = 1
break
endif
end
else
set error = 1
endif
endif
if ("$error" == "1") then
echo "Usage : $0 [-c] [<hostname>] [<teamname>] [-p ...]"
echo "-c means to start coach"
echo "The arguments following -p are the UNums of the players to be started."
exit
endif
echo "***************************************"
echo "* TsinghuAeolus2002 *"
echo "***************************************"
# start the players
set PARAM = " -file $CLIENT_CONF -file $SERVER_CONF -host $HOST -team_name $TEAMNAME"
foreach i ($playerlist)
if ($i == GOALIE_NUM) then
$CLIENT $PARAM -goalie -UNum "$i" &
else
$CLIENT $PARAM -UNum "$i" &
endif
sleep 1
end
set COACHPARAM = " -file $COACH_CONF -file CLIENT_CONF -host $HOST -team_name $TEAMNAME"
if ("$coach" == "1") then
echo "***********************************"
echo "start tsinghuaeolus coach"
$COACH $COACHPARAM &
endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -