Encerre a coisa toda em um loop while true
e break
em cada ponto em que você deseja terminar.
Note também que não há necessidade da matriz choices
.
#!/bin/bash
echo "Welcome to play Rock, Paper, Scissors"
while true
do
echo "Choose Rock(0), Paper(1), Scissors(2)"
#read players choice
read PLAYER
#randomize the computer choice
COMPUTER=$((RANDOM%3))
if [[ $PLAYER = 0 && $COMPUTER = 1 ]]
then echo "i have paper , i win";
elif [[ $PLAYER = 1 && $COMPUTER = 1 ]]
then echo "i have paper , we draw";
elif [[ $PLAYER = 2 && $COMPUTER = 1 ]]
then echo "i have paper , you win, bye bye"; break
elif [[ $PLAYER = 0 && $COMPUTER = 0 ]]
then echo "i have rock , we draw";
elif [[ $PLAYER = 1 && $COMPUTER = 0 ]]
then echo "i have rock , you win, bye bye"; break
elif [[ $PLAYER = 2 && $COMPUTER = 0 ]]
then echo "i have rock , i win";
elif [[ $PLAYER = 0 && $COMPUTER = 2 ]]
then echo "i have scissors, you win, bye bye"; break
elif [[$count = 0 && $PLAYER = 1 && $COMPUTER = 2 ]]
then echo "i have scissors, i win";
elif [[$count = 0 && $PLAYER = 2 && $COMPUTER = 2 ]]
then echo "i have scissors, we draw "
fi
done