Tic-tac-toe

This commit is contained in:
Arkadiusz Hypki 2023-05-29 18:13:42 +02:00
parent c477b99571
commit ebd245352b
1 changed files with 26 additions and 0 deletions

View File

@ -0,0 +1,26 @@
ttt=("_" "_" "_" "_" "_" "_" "_" "_" "_")
while [ 1 -eq 1 ]
do
echo ""
for ((i=0; i<10; i++))
do
echo -n ${ttt[$i]}
if [ $i -eq 2 -o $i -eq 5 ]
then
echo ""
fi
done
echo ""
echo "User, your move: "
read usr
ttt[$usr-1]="O"
# bash puts cross
.........
done