Here's a basic Tic-Tac-Toe.
The next part is to make the computer play the computer.
Edit: Player V CPU: https://hackforums.net/showthread.php?tid=2886755
Code
@echo off
title TTT
setlocal enabledelayedexpansion
: start
set 1=1
set 2=2
set 3=3
set 4=4
set 5=5
set 6=6
set 7=7
set 8=8
set 9=9
set t=X
: board
cls
echo !7! !8! !9!
echo !4! !5! !6!
echo !1! !2! !3!
echo.
if !1!==X if !4!==X if !7!==X goto xwin
if !1!==O if !4!==O if !7!==O goto owin
if !2!==X if !5!==X if !8!==X goto xwin
if !2!==O if !5!==O if !8!==O goto owin
if !3!==X if !6!==X if !9!==X goto xwin
if !3!==O if !6!==O if !9!==O goto owin
if !1!==X if !2!==X if !3!==X goto xwin
if !1!==O if !2!==O if !3!==O goto owin
if !4!==X if !5!==X if !6!==X goto xwin
if !4!==O if !5!==O if !6!==O goto owin
if !7!==X if !8!==X if !9!==X goto xwin
if !7!==O if !8!==O if !9!==O goto owin
if !1!==X if !5!==X if !9!==X goto xwin
if !1!==O if !5!==O if !9!==O goto owin
if !3!==X if !5!==X if !7!==X goto xwin
if !3!==O if !5!==O if !7!==O goto owin
if not !1!==1 if not !2!==2 if not !3!==3 if not !4!==4 if not !5!==5 if not !6!==6 if not !7!==7 if not !8!==8 if not !9!==9 goto nowin
echo %t%, your go! Choose a number..
CHOICE /C 123456789 >nul
set %errorlevel%=%t%
if %t%==X (set t=O) else (set t=X)
goto board
: nowin
echo No one has won!
pause >nul
goto start
: xwin
echo X wins!
pause >nul
goto start
: owin
echo O wins!
pause >nul
goto startThe next part is to make the computer play the computer.
Edit: Player V CPU: https://hackforums.net/showthread.php?tid=2886755
