#!/bin/csh -f
# easier run_game -- command-line args for players (0 to 4)

set board = board_example
set player1 = (${USER})
set player2 = (example)
set player3 = (example)
set player4 = (example)
if ($#argv >= 5) then
  set board = ($5)
endif
if ($#argv >= 4) then
  set player4 = ($4)
endif
if ($#argv >= 3) then
  set player3 = ($3)
endif
if ($#argv >= 2) then
  set player2 = ($2)
endif
if ($#argv >= 1) then
  set player1 = ($1)
endif


# Default options for game
set mitosis_options = (	\
	-gfx \
	-fn_x_cour_12pt '*-lucida sans typewriter-bold-r-normal-sans-*-140-*' \
	-num_rounds 1000 \
	-start_energy 200 \
 	-cost_food 10 \
	-cost_toxin 20 \
	-cost_move 1 \
	-cost_stay 1 \
	-cost_split 10 \
	-cost_look_r1 2 \
	-cost_look_r2 4 \
	-cost_look_r3 6 \
	-cost_look_r4 8 \
	-cost_look_r5 10 \
	-sense_radius 100 \
	-cell_size 2 \
	)

set num_players = 4

if ($?LD_LIBRARY_PATH) then
setenv LD_LIBRARY_PATH ${cwd}:${LD_LIBRARY_PATH}
else
setenv LD_LIBRARY_PATH $cwd
endif

# added by GRG so it works...
setenv LD_LIBRARY_PATH /usr/openwin/lib:$LD_LIBRARY_PATH


./mitosis -board $board -players $player1 $player2 $player3 $player4 -num_players \
$num_players $mitosis_options:q
