ajout de emptybot

This commit is contained in:
2019-01-27 07:28:31 +01:00
parent ab2d7de654
commit f597fc4995
9 changed files with 242 additions and 10 deletions

View File

@@ -68,29 +68,27 @@ while IFS='' read -r line || [[ -n "$line" ]]; do
LISTE_METHODE=`ls $APPS_PATH/methode2 | grep -v treemap | grep -v robot | shuf | head -n 1`
fi
cd $APPS_PATH/methode2
for METHODE in $LISTE_METHODE
do
if [ ! -d $DATA_PATH/$METHODE ]
then
mkdir -p $DATA_PATH/$METHODE
fi
echo $BLOCK $NAME $METHODE
if [ ! -f $DATA_PATH/$METHODE/$BLOCK.png ]
then
cd $APPS_PATH/methode2
php robot.php $METHODE $BLOCK $((RANDOM % 6)) $2
cp $DATA_PATH/last/$BLOCK.png $DATA_PATH/$METHODE/$BLOCK.png
cd - >> /dev/null
fi
done
cd - >> /dev/null
if [ ! -f $DATA_PATH/hasard/$BLOCK.png ]
then
cp $DATA_PATH/last/$BLOCK.png $DATA_PATH/hasard/$BLOCK.png
fi
touch $DATA_PATH/hasard/$BLOCK.png
rm -f $flag
done < $DATA_PATH/block_list.txt