#!/bin/sh
#*******************************************************************************
# Copyright 2008, 2011 Hochschule Offenburg
# Klaus Dorer, Mathias Ehret, Stefan Glaser, Thomas Huber, Fabian Korak,
# Simon Raffeiner, Srinivasa Ragavan, Thomas Rinklin,
# Joachim Schilling, Ingo Schindler, Rajit Shahi, Bjoern Weiler
#
# This file is part of magmaOffenburg.
#
# magmaOffenburg is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# magmaOffenburg is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with magmaOffenburg. If not, see <http://www.gnu.org/licenses/>.
#*******************************************************************************

###########################################
# Starts a magmaOffenburg RoboCup client
# example: sh start.sh localhost
###########################################

if [ $# -ne 1 ]; then
	echo "Usage: $0 <Server IP>"
	exit 1
fi

mkdir -p log
today=`date +%Y-%m-%d-%H-%M-%S`
i=1
while [ "$i" -le 7 ]; do
	java -cp "lib/*" magma.robots.RoboCupClient --playerid=$i --server=$1 --factory=T1 --port=60000 1>log/outAndError$today.log 2>&1 &
    i=$((i + 1))
done