#!/bin/sh -e

# Computer AI players to load
OPPS="aiDummy aiConway aiColson"

if [ $# -ge 1 ]; then
	SERVER=$1
else
	SERVER=localhost
	echo -n Loading local riskserver into the background...
	/usr/games/friskserver localhost > /dev/null &
	echo done.
fi

for i in $OPPS; do
	echo -n Loading computer player $i for play on $SERVER...
	/usr/games/$i $SERVER > /dev/null &
	echo done.
done

echo -n Now starting xfrisk client for play on $SERVER...
/usr/games/xfrisk $SERVER &
echo done.
