mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-28 07:58:08 +01:00
add ability to specify seed and vary board-size
This commit is contained in:
parent
1575279cd8
commit
384a41ed5b
1 changed files with 5 additions and 1 deletions
|
@ -15,6 +15,8 @@ DROP_N=${DROP_N:-0}
|
||||||
MINRUN=2
|
MINRUN=2
|
||||||
ONE_PER_ROOM=""
|
ONE_PER_ROOM=""
|
||||||
ALL_VIA_RQ=${ALL_VIA_RQ:-FALSE}
|
ALL_VIA_RQ=${ALL_VIA_RQ:-FALSE}
|
||||||
|
SEED=${SEED:-""}
|
||||||
|
BOARD_SIZES=(15)
|
||||||
|
|
||||||
declare -a DICTS_ARR
|
declare -a DICTS_ARR
|
||||||
for DICT in $DICTS; do
|
for DICT in $DICTS; do
|
||||||
|
@ -22,6 +24,7 @@ for DICT in $DICTS; do
|
||||||
done
|
done
|
||||||
|
|
||||||
NAMES=(UNUSED Brynn Ariela Kati Eric)
|
NAMES=(UNUSED Brynn Ariela Kati Eric)
|
||||||
|
[ -n "$SEED" ] && RANDOM=$SEED
|
||||||
|
|
||||||
LOGDIR=$(basename $0)_logs
|
LOGDIR=$(basename $0)_logs
|
||||||
RESUME=""
|
RESUME=""
|
||||||
|
@ -141,7 +144,8 @@ build_cmds() {
|
||||||
CMD="$CMD $OTHERS --game-dict $DICT --port $PORT --host $HOST "
|
CMD="$CMD $OTHERS --game-dict $DICT --port $PORT --host $HOST "
|
||||||
CMD="$CMD --file $FILE --slow-robot 1:3 --skip-confirm"
|
CMD="$CMD --file $FILE --slow-robot 1:3 --skip-confirm"
|
||||||
CMD="$CMD --drop-nth-packet $DROP_N $PLAT_PARMS"
|
CMD="$CMD --drop-nth-packet $DROP_N $PLAT_PARMS"
|
||||||
|
[ -n "$SEED" ] && CMD="$CMD --seed $((SEED+DEV))"
|
||||||
|
CMD="$CMD --board-size ${BOARD_SIZES[$((RANDOM%${#BOARD_SIZES[*]}))]}"
|
||||||
CMD="$CMD $PUBLIC"
|
CMD="$CMD $PUBLIC"
|
||||||
CMDS[$COUNTER]=$CMD
|
CMDS[$COUNTER]=$CMD
|
||||||
ROOMS[$COUNTER]=$ROOM
|
ROOMS[$COUNTER]=$ROOM
|
||||||
|
|
Loading…
Add table
Reference in a new issue