Tic-tac-toe

This commit is contained in:
Arkadiusz Hypki 2023-05-29 18:40:34 +02:00
parent ebd245352b
commit 67ee613100

View File

@ -21,6 +21,15 @@ read usr
ttt[$usr-1]="O"
# bash puts cross
.........
n=1
while [ 1 -eq $n ]
do
l=$(($RANDOM % 9))
if [ ${ttt[$l]} = "_" ]
then
ttt[$l]="X"
n=0
fi
done
done