# Solved: Batch Enter in CHOOSE command



## seifpic (Jul 15, 2010)

Hello, I am coding a batch game using Notepad++ and got stuck making the menu.
The menu has ASCII graphics (text graphics). By now i got the ASCII graphic to display without closing the cmd window. I want the user to use the 's' and 'w' keys to switch between the menu items and enter to confirm.
The part i'm stuck in is using the enter key in the CHOICE command.

```
CHOICE /c sw /n >nul
IF "%errorlevel%"=="1" GOTO Play
IF "%errorlevel%"=="2" GOTO Play
```
Is there a way to use the enter key in the CHOICE command?
PS. i know that the choice command doesnt work on all versions of windows.


----------



## TheOutcaste (Aug 8, 2007)

Short answer is No.
The valid choice characters are: a-z, A-Z, 0-9 and ASCII values of 128 to 254.
Choice only accepts one entry. If you press a key not in the list, it beeps. You can press CTRL+C or CTRL+Break and you'll get an errorlevel of 0 if you chose not to terminate the program, but there is no way to put Enter as a choice.
You can do something like this to echo their choice and ask for confirmation. If they don't press enter, you go back to the Menu.:

```
@Echo Off
Set _Letters=-SW
:_Menu
:: Display choices
CHOICE /C %_Letters:~1,2% /N
Set _Choice=%Errorlevel%
Call Set _Choice=%%_Letters:~%_Choice%,1%%
Set _Confirm=
Set /P _Confirm=You chose %_Choice%, press Enter to confirm
If "%_Confirm%"=="" Goto _Play
Goto _Menu
:_Play
```


----------



## seifpic (Jul 15, 2010)

Thnx.
You gave me a good idea.
i'll just use another key for confirmation. XD
ThanQ


----------



## TheOutcaste (Aug 8, 2007)

seifpic said:


> Hello, i reopened this case again. Another problem.
> i have got another page with ASCII graphics, they look great in the editor (notepad/Notepad++) but come out screwed up in the cmd window.
> save the following code in a .bat format,
> 
> ...


Your variables are three underscores.
The variable in the command line uses 4 characters %a1%, you have to set your spacing using the value of the variable, not the length the variable name and the percent symbols.
Try it with four underscores.

Line 23 has an unused variable, e with no number.

EDIT: Guess you figured it out


----------



## Squashman (Apr 4, 2003)

YOu need an extra underscore in all your set statements


----------



## seifpic (Jul 15, 2010)

Yeah, i just figured that out. That's why i deleted the post.


----------



## Squashman (Apr 4, 2003)

Wish you wouldn't have deleted your post. Now it makes our posts look awkward.


----------



## seifpic (Jul 15, 2010)

i do before i think!


----------



## Squashman (Apr 4, 2003)

Your post was still there after our two posts. TheOutCaste IM'd me and told me it had been deleted. I refreshed the screen and then it was gone.


----------



## seifpic (Jul 15, 2010)

it would,ve been nice if there was an auto refresh in these forums...


----------



## Squashman (Apr 4, 2003)

Instead of deleting your post just reply to it and say you figured it out.


----------



## seifpic (Jul 15, 2010)

Yeah well....


----------



## seifpic (Jul 15, 2010)

Ok, opened this thread again.
So i am stuck trying to add 1 to a value.
I have tried using this way:

```
SET Turns=%Turns%+1
```
Right now, the Turns variable has a value of zero (Turns = 0)
And i want it to go up in a function.
can sumbody help? plz.


----------



## seifpic (Jul 15, 2010)

btw, im using batch


----------



## TheOutcaste (Aug 8, 2007)

You need the /A switch (*A* for *A*rithmetic maybe?)
All three of these will do the same. The % symbols aren't needed when doing math.

```
Set /A Turns=%Turns%+1
Set /A Turns=Turns+1
Set /A Turns+=1
```
*Set /?* will show the usage options


----------



## seifpic (Jul 15, 2010)

I guess this turned out to be a pretty good forum. 
Thanx TheOutcaste. I am pretty much done, just putting some finishing touches.


----------



## seifpic (Jul 15, 2010)

I think this is the last question for this post.
i want when the batch folder is opened, a random color (from a selection i make) to appear on the black backround:
so like this:
COLOR 0++random foreground color.
My selected colors are:
09, 0a, 0c, 0d, and 0f.
When i finish this, i might post an installer of the game i make.


----------



## TheOutcaste (Aug 8, 2007)

```
Set _ColVal=9ACDF
Set /A _Num=%random% %% 5
Call Set _Color=%%_ColVal:~%_Num%,1%%
Color 0%_Color%
```
In this case, you must include the percent symbols around *random* in the *Set /A* statement. Without them the command processor looks for a user variable named *random*, rather than the special Random Number variable *%random%*.

The *Set /A* statement gives the Modulus of the random number divided by 5, so you get a value from 0-4. This is used to select the foreground color from the *_ColVal* string.


----------



## seifpic (Jul 15, 2010)

Thanks, TheOutcaste, and Squashman for helping out. I have finished the first version of the game, however it may contain a lot of bugs, please pm me with any bugs you find. Have fun. The installer is in an attached txt folder. Rename the extention from .txt to .zip


----------



## Squashman (Apr 4, 2003)

How bout you just post the batch code here. I would rather not install something I don't have to.


----------



## seifpic (Jul 15, 2010)

Well, i'll see. But the problem is it's three batch files, one .exe (a batch that runs the game but it is converted), one icon, and two .txt files.


----------



## seifpic (Jul 15, 2010)

New Installer:
Change the extention from .txt to .exe


----------



## seifpic (Jul 15, 2010)

Ok the .bat files:

menu_2.bat:


```
@ECHO OFF
START CMD /C "@TITLE A SEIFPIC© GAME && COLOR 09 && @mode con cols=62 lines=40 && TYPE seifpic.txt && PING -n 6 0.0.0.0 >nul && EXIT" 
@mode con cols=74 lines=41
@TITLE ConN3Ct FO4 V 1.0
COLOR 48
:S
:Play
CLS
ECHO "     ____            _   _ _____ _____     _      _____ ___  _  _
ECHO "    / ___|___  _ __ | \ | |___ /| ____|___| |_   |  ___/ _ \| || |
ECHO "   | |   / _ \| '_ \|  \| | |_ \|  _| / __| __|  | |_ | | | | || |_
ECHO "   | |__| (_) | | | | |\  |___) | |__| (__| |_   |  _|| |_| |__   _|
ECHO "    \____\___/|_| |_|_| \_|____/|_____\___|\__|  |_|   \___/   |_|
ECHO "
ECHO "                         __     __  _   ___
ECHO "                         \ \   / / / | / _ \
ECHO "                          \ \ / /  | || | | |
ECHO "                           \ V /   | || |_| |
ECHO "                            \_/    |_(_)___/
ECHO "________________________________________________________________________
ECHO "
ECHO "                 ___________________________________
ECHO "            ___  |       ____  _                   |  ___
ECHO "           / _ \ |      |  _ \| | __ _ _   _       | / _ \
ECHO "           || || |      | |_) | |/ _` | | | |      | || ||
ECHO "           ||_|| |      |  __/| | (_| | |_| |      | ||_||
ECHO "           \___/ |      |_|   |_|\__,_|\__, |      | \___/
ECHO "                 |_____________________|___/_______|
ECHO "
ECHO "
ECHO "        ___           _                   _   _
ECHO "       |_ _|_ __  ___| |_ _ __ _   _  ___| |_(_) ___  _ __  ___
ECHO "        | || '_ \/ __| __| '__| | | |/ __| __| |/ _ \| '_ \/ __|
ECHO "        | || | | \__ \ |_| |  | |_| | (__| |_| | (_) | | | \__ \
ECHO "       |___|_| |_|___/\__|_|   \__,_|\___|\__|_|\___/|_| |_|___/
ECHO "
ECHO "
ECHO "                          _____      _ _
ECHO "                         | ____|_  _(_) |_
ECHO "                         |  _| \ \/ / | __|
ECHO "                         | |___ >  <| | |_
ECHO "                         |_____/_/\_\_|\__|
ECHO "
ECHO "
ECHO "press the 's' and 'w' keys to switch between catagories and 'y' to 
ECHO "confirm.
CHOICE /c swy /n >nul
IF "%errorlevel%"=="1" GOTO Instructions
IF "%errorlevel%"=="2" GOTO Exit
IF "%errorlevel%"=="3" GOTO Ply
:Ply
START game.bat
EXIT
PAUSE>nul
:Instructions
CLS
ECHO "     ____            _   _ _____ _____     _      _____ ___  _  _
ECHO "    / ___|___  _ __ | \ | |___ /| ____|___| |_   |  ___/ _ \| || |
ECHO "   | |   / _ \| '_ \|  \| | |_ \|  _| / __| __|  | |_ | | | | || |_
ECHO "   | |__| (_) | | | | |\  |___) | |__| (__| |_   |  _|| |_| |__   _|
ECHO "    \____\___/|_| |_|_| \_|____/|_____\___|\__|  |_|   \___/   |_|
ECHO "
ECHO "                         __     __  _   ___
ECHO "                         \ \   / / / | / _ \
ECHO "                          \ \ / /  | || | | |
ECHO "                           \ V /   | || |_| |
ECHO "                            \_/    |_(_)___/
ECHO "________________________________________________________________________
ECHO "
ECHO " 
ECHO "                         ____  _
ECHO "                        |  _ \| | __ _ _   _
ECHO "                        | |_) | |/ _` | | | |
ECHO "                        |  __/| | (_| | |_| |
ECHO "                        |_|   |_|\__,_|\__, |
ECHO "                                       |___/
ECHO "
ECHO "      ___________________________________________________________
ECHO "  ___ | ___           _                   _   _                 | ___
ECHO " / _ \||_ _|_ __  ___| |_ _ __ _   _  ___| |_(_) ___  _ __  ___ |/ _ \
ECHO " || ||| | || '_ \/ __| __| '__| | | |/ __| __| |/ _ \| '_ \/ __|||| ||
ECHO " ||_||| | || | | \__ \ |_| |  | |_| | (__| |_| | (_) | | | \__ \|||_||
ECHO " \___/||___|_| |_|___/\__|_|   \__,_|\___|\__|_|\___/|_| |_|___/|\___/
ECHO "      |_________________________________________________________|
ECHO "
ECHO "                          _____      _ _
ECHO "                         | ____|_  _(_) |_
ECHO "                         |  _| \ \/ / | __|
ECHO "                         | |___ >  <| | |_
ECHO "                         |_____/_/\_\_|\__|
ECHO "
ECHO "
ECHO "press the 's' and 'w' keys to switch between catagories and 'y' to 
ECHO "confirm.
CHOICE /c swy /n >nul
IF "%errorlevel%"=="1" GOTO Exit
IF "%errorlevel%"=="2" GOTO Play
IF "%errorlevel%"=="3" GOTO Ins
PAUSE>nul
CLS
GOTO S
:Ins
CLS
ECHO " Objective Of the game:
ECHO "_________________________________________________
ECHO " To win Connect Four you must be the first player 
ECHO "to get four of your colored checkers in a row 
ECHO "either horizontally, vertically or diagonally.
ECHO.
ECHO.
ECHO "Controls:
ECHO "_________________________________________________
ECHO " First, there will be a prompt asking The game mode.
ECHO "Choose The CoMpUtEr ( if you want to play Single  
ECHO "player / versus the CPU) by pressing the '1' button 
ECHO "either on the number pad or on the keyboard.
ECHO "Choose Multiplayer (To play versus someone on the
ECHO "same PC) by pressing the '1' button either on the
ECHO "number pad or on the keyboard. Type the Nicknames
ECHO "of your choice and press enter to confirm.
ECHO.
ECHO "Controls (continued):
ECHO "__________________________________________________
ECHO "When in The game itself, the table is drawn in ascii
ECHO "graphics (text graphics). Choose the row to insert
ECHO "your playing piece (either x or o) from a, b, c, d,
ECHO "and e. The press the button that goes with it.
ECHO "#####################################################
ECHO "press any key to go back to the menu...
PAUSE >nul
GOTO S
:EXIT
CLS
ECHO "     ____            _   _ _____ _____     _      _____ ___  _  _
ECHO "    / ___|___  _ __ | \ | |___ /| ____|___| |_   |  ___/ _ \| || |
ECHO "   | |   / _ \| '_ \|  \| | |_ \|  _| / __| __|  | |_ | | | | || |_
ECHO "   | |__| (_) | | | | |\  |___) | |__| (__| |_   |  _|| |_| |__   _|
ECHO "    \____\___/|_| |_|_| \_|____/|_____\___|\__|  |_|   \___/   |_|
ECHO "
ECHO "                         __     __  _   ___
ECHO "                         \ \   / / / | / _ \
ECHO "                          \ \ / /  | || | | |
ECHO "                           \ V /   | || |_| |
ECHO "                            \_/    |_(_)___/
ECHO "________________________________________________________________________
ECHO "
ECHO " 
ECHO "                         ____  _
ECHO "                        |  _ \| | __ _ _   _
ECHO "                        | |_) | |/ _` | | | |
ECHO "                        |  __/| | (_| | |_| |
ECHO "                        |_|   |_|\__,_|\__, |
ECHO "                                       |___/
ECHO "
ECHO "
ECHO "        ___           _                   _   _
ECHO "       |_ _|_ __  ___| |_ _ __ _   _  ___| |_(_) ___  _ __  ___
ECHO "        | || '_ \/ __| __| '__| | | |/ __| __| |/ _ \| '_ \/ __|
ECHO "        | || | | \__ \ |_| |  | |_| | (__| |_| | (_) | | | \__ \
ECHO "       |___|_| |_|___/\__|_|   \__,_|\___|\__|_|\___/|_| |_|___/
ECHO "
ECHO "                         __________________
ECHO "                    ___ | _____      _ _   | ___
ECHO "                   / _ \|| ____|_  _(_) |_ |/ _ \
ECHO "                   || ||||  _| \ \/ / | __|||| ||
ECHO "                   ||_|||| |___ >  <| | |_ |||_||
ECHO "                   \___/||_____/_/\_\_|\__||\___/
ECHO "                        |__________________|
ECHO "
ECHO "press the 's' and 'w' keys to switch between catagories and 'y' to 
ECHO "confirm.
CHOICE /c swy /n >nul
IF "%errorlevel%"=="1" GOTO Play
IF "%errorlevel%"=="2" GOTO Instructions
IF "%errorlevel%"=="3" Exit
```
game.bat :


```
@ECHO OFF
@mode con cols=74 lines=35
@TITLE CoN3Ct FO4 V 1.0
SET nickname=Me
Set _ColVal=9ACDF
Set /A _Num=%random% %% 5
Call Set _Color=%%_ColVal:~%_Num%,1%%
Color 0%_Color%
:VS
ECHO Do You Want To Play Vs:
ECHO 1) The CoMpUtEr
ECHO 2) Multiplayer/ Yourself
CHOICE /c 12 /n >nul
CLS
IF "%errorlevel%"=="2" GOTO settings
IF "%errorlevel%"=="1" START vspc.bat
EXIT
:settings
ECHO Player 1, Type Your Nickname, You will play as X's:
set /p nickname=
CLS
GOTO vsmultisett
 :vsmultisett
ECHO Type player 2's Nickname, You will play as O's:
 set /p nickname2=
 CLS
 GOTO vsmulti
 
:vsmulti
SET a1=____
SET a2=____
SET a3=____
SET a4=____
SET a5=____
SET b1=____
SET b2=____
SET b3=____
SET b4=____
SET b5=____
SET c1=____
SET c2=____
SET c3=____
SET c4=____
SET c5=____
SET d1=____
SET d2=____
SET d3=____
SET d4=____
SET d5=____
SET e1=____
SET e2=____
SET e3=____
SET e4=____
SET e5=____
SET /a Turns=0
SET currentply=%nickname%
:VSpLAY
ECHO "Type where to insert your playing piece (A, B, C, D, E)
ECHO " Turns:%Turns%
ECHO " It's %currentply%'s Turn.
ECHO "
ECHO "        _______________________________________
ECHO "       /___A______B______C______D______E_____ /|
ECHO "      |  (%a1%) (%b1%) (%c1%) (%d1%) (%e1%)  |/|
ECHO "      |    ||     ||     ||     ||     ||    |/|
ECHO "      |  (%a2%) (%b2%) (%c2%) (%d2%) (%e2%)  |/|
ECHO "      |    ||     ||     ||     ||     ||    |/|
ECHO "      |  (%a3%) (%b3%) (%c3%) (%d3%) (%e3%)  |/|______________
ECHO "      |    ||     ||     ||     ||     ||    |/|            / |
ECHO "      |  (%a4%) (%b4%) (%c4%) (%d4%) (%e4%)  |/|_          /  |
ECHO "      |    ||     ||     ||     ||     ||    |/|/|        /   |
ECHO "      |  (%a5%) (%b5%) (%c5%) (%d5%) (%e5%)  |/|/        / /| |
ECHO "     /|______________________________________|//        / / | |
ECHO "    //______________________________________///        / /__|/
ECHO "   / \______________________________________\/        / /
ECHO "  /__________________________________________________/ /
ECHO "  |   ____________________________________________   | |
ECHO "  |  | |                                          |  | |
ECHO "  |  | |                                          |  | |
ECHO "  |__|/                                           |__|/
ECHO "
ECHO "*************************************************************************
IF %currentply% EQU %nickname% GOTO CHOICEX
IF %currentply% EQU %nickname2% GOTO CHOICEO
:CHOICEX
CHOICE /c abcde /n >nul
IF "%errorlevel%"=="1" GOTO Ainsert 
IF "%errorlevel%"=="2" GOTO Binsert 
IF "%errorlevel%"=="3" GOTO Cinsert 
IF "%errorlevel%"=="4" GOTO Dinsert
IF "%errorlevel%"=="5" GOTO Einsert 
:CHOICEO
CHOICE /c abcde /n >nul
IF "%errorlevel%"=="1" GOTO Ainserto
IF "%errorlevel%"=="2" GOTO Binserto
IF "%errorlevel%"=="3" GOTO Cinserto
IF "%errorlevel%"=="4" GOTO Dinserto
IF "%errorlevel%"=="5" GOTO Einserto
:Ainsert
IF %a5% EQU _x__ GOTO Ainsert2
IF %a5% EQU _o__ GOTO Ainsert2
SET /a Turns=%Turns%+1
SET a5=_x__
SET currentply=%nickname2%
GOTO CHECKWIN
:Ainsert2
IF %a4% EQU _x__ GOTO Ainsert3
IF %a4% EQU _o__ GOTO Ainsert3
SET /a Turns=%Turns%+1
SET a4=_x__
SET currentply=%nickname2%
GOTO CHECKWIN
:Ainsert3
IF %a3% EQU _x__ GOTO Ainsert4
IF %a3% EQU _o__ GOTO Ainsert4
SET /a Turns=%Turns%+1
SET a3=_x__
SET currentply=%nickname2%
GOTO CHECKWIN
:Ainsert4
IF %a2% EQU _x__ GOTO Ainsert5
IF %a2% EQU _o__ GOTO Ainsert5
SET /a Turns=%Turns%+1
SET a2=_x__
SET currentply=%nickname2%
GOTO CHECKWIN
:Ainsert5
IF %a1% EQU _x__ GOTO full
IF %a1% EQU _o__ GOTO full
SET /a Turns=%Turns%+1
SET a1=_x__
SET currentply=%nickname2%
GOTO CHECKWIN
:Binsert
IF %b5% EQU _x__ GOTO Binsert2
IF %b5% EQU _o__ GOTO Binsert2
SET /a Turns=%Turns%+1
SET b5=_x__
SET currentply=%nickname2%
GOTO CHECKWIN
:Binsert2
IF %b4% EQU _x__ GOTO Binsert3
IF %b4% EQU _o__ GOTO Binsert3
SET /a Turns=%Turns%+1
SET b4=_x__
SET currentply=%nickname2%
GOTO CHECKWIN
:Binsert3
IF %b3% EQU _x__ GOTO Binsert4
IF %b3% EQU _o__ GOTO Binsert4
SET /a Turns=%Turns%+1
SET b3=_x__
SET currentply=%nickname2%
GOTO CHECKWIN
:Binsert4
IF %b2% EQU _x__ GOTO Binsert5
IF %b2% EQU _o__ GOTO Binsert5
SET /a Turns=%Turns%+1
SET b2=_x__
SET currentply=%nickname2%
GOTO CHECKWIN
:Binsert5
IF %b1% EQU _x__ GOTO full
IF %b1% EQU _o__ GOTO full
SET /a Turns=%Turns%+1
SET b1=_x__
SET currentply=%nickname2%
GOTO CHECKWIN
:Cinsert
IF %c5% EQU _x__ GOTO Cinsert2
IF %c5% EQU _o__ GOTO Cinsert2
SET /a Turns=%Turns%+1
SET c5=_x__
SET currentply=%nickname2%
GOTO CHECKWIN
:Cinsert2
IF %c4% EQU _x__ GOTO Cinsert3
IF %c4% EQU _o__ GOTO Cinsert3
SET /a Turns=%Turns%+1
SET c4=_x__
SET currentply=%nickname2%
GOTO CHECKWIN
:Cinsert3
IF %c3% EQU _x__ GOTO Cinsert4
IF %c3% EQU _o__ GOTO Cinsert4
SET /a Turns=%Turns%+1
SET c3=_x__
SET currentply=%nickname2%
GOTO CHECKWIN
:Cinsert4
IF %c2% EQU _x__ GOTO Cinsert5
IF %c2% EQU _o__ GOTO Cinsert5
SET /a Turns=%Turns%+1
SET c2=_x__
SET currentply=%nickname2%
GOTO CHECKWIN
:Cinsert5
IF %c1% EQU _x__ GOTO full
IF %c1% EQU _o__ GOTO full
SET /a Turns=%Turns%+1
SET c1=_x__
SET currentply=%nickname2%
GOTO CHECKWIN
:Dinsert
IF %d5% EQU _x__ GOTO Dinsert2
IF %d5% EQU _o__ GOTO Dinsert2
SET /a Turns=%Turns%+1
SET d5=_x__
SET currentply=%nickname2%
GOTO CHECKWIN
:Dinsert2
IF %d4% EQU _x__ GOTO Dinsert3
IF %d4% EQU _o__ GOTO Dinsert3
SET /a Turns=%Turns%+1
SET d4=_x__
SET currentply=%nickname2%
GOTO CHECKWIN
:Dinsert3
IF %d3% EQU _x__ GOTO Dinsert4
IF %d3% EQU _o__ GOTO Dinsert4
SET /a Turns=%Turns%+1
SET d3=_x__
SET currentply=%nickname2%
GOTO CHECKWIN
:Dinsert4
IF %d2% EQU _x__ GOTO Dinsert5
IF %d2% EQU _o__ GOTO Dinsert5
SET /a Turns=%Turns%+1
SET d2=_x__
SET currentply=%nickname2%
GOTO CHECKWIN
:Dinsert5
IF %d1% EQU _x__ GOTO full
IF %d1% EQU _o__ GOTO full
SET /a Turns=%Turns%+1
SET d1=_x__
SET currentply=%nickname2%
GOTO CHECKWIN
:Einsert
IF %e5% EQU _x__ GOTO Einsert2
IF %e5% EQU _o__ GOTO Einsert2
SET /a Turns=%Turns%+1
SET e5=_x__
SET currentply=%nickname2%
GOTO CHECKWIN
:Einsert2
IF %e4% EQU _x__ GOTO Einsert3
IF %e4% EQU _o__ GOTO Einsert3
SET /a Turns=%Turns%+1
SET e4=_x__
SET currentply=%nickname2%
GOTO CHECKWIN
:Einsert3
IF %e3% EQU _x__ GOTO Einsert4
IF %e3% EQU _o__ GOTO Einsert4
SET /a Turns=%Turns%+1
SET e3=_x__
SET currentply=%nickname2%
GOTO CHECKWIN
:Einsert4
IF %e2% EQU _x__ GOTO Einsert5
IF %e2% EQU _o__ GOTO Einsert5
SET /a Turns=%Turns%+1
SET e2=_x__
SET currentply=%nickname2%
GOTO CHECKWIN
:Einsert5
IF %e1% EQU _x__ GOTO full
IF %e1% EQU _o__ GOTO full
SET /a Turns=%Turns%+1
SET e1=_x__
SET currentply=%nickname2%
GOTO CHECKWIN
CLS
:Ainserto
IF %a5% EQU _x__ GOTO Ainsert2o
IF %a5% EQU _o__ GOTO Ainsert2o
SET /a Turns=%Turns%+1
SET a5=_o__
SET currentply=%nickname%
GOTO CHECKWIN
CLS
GOTO VSpLAY
:Ainsert2o
IF %a4% EQU _x__ GOTO Ainsert3o
IF %a4% EQU _o__ GOTO Ainsert3o
SET /a Turns=%Turns%+1
SET a4=_o__
SET currentply=%nickname%
GOTO CHECKWIN
CLS
GOTO VSpLAY
:Ainsert3o
IF %a3% EQU _x__ GOTO Ainsert4o
IF %a3% EQU _o__ GOTO Ainsert4o
SET /a Turns=%Turns%+1
SET a3=_o__
SET currentply=%nickname%
GOTO CHECKWIN
CLS
GOTO VSpLAY
:Ainsert4o
IF %a2% EQU _x__ GOTO Ainsert5o
IF %a2% EQU _o__ GOTO Ainsert5o
SET /a Turns=%Turns%+1
SET a2=_o__
SET currentply=%nickname%
GOTO CHECKWIN
CLS
GOTO VSpLAY
:Ainsert5o
IF %a1% EQU _x__ GOTO full
IF %a1% EQU _o__ GOTO full
SET /a Turns=%Turns%+1
SET a1=_o__
SET currentply=%nickname%
GOTO CHECKWIN
CLS
GOTO VSpLAY
:Binserto
IF %b5% EQU _x__ GOTO Binsert2o
IF %b5% EQU _o__ GOTO Binsert2o
SET /a Turns=%Turns%+1
SET b5=_o__
SET currentply=%nickname%
GOTO CHECKWIN
CLS
GOTO VSpLAY
:Binsert2o
IF %b4% EQU _x__ GOTO Binsert3o
IF %b4% EQU _o__ GOTO Binsert3o
SET /a Turns=%Turns%+1
SET b4=_o__
SET currentply=%nickname%
GOTO CHECKWIN
CLS
GOTO VSpLAY
:Binsert3o
IF %b3% EQU _x__ GOTO Binsert4o
IF %b3% EQU _o__ GOTO Binsert4o
SET /a Turns=%Turns%+1
SET b3=_o__
SET currentply=%nickname%
GOTO CHECKWIN
CLS
GOTO VSpLAY
:Binsert4o
IF %b2% EQU _x__ GOTO Binsert5o
IF %b2% EQU _o__ GOTO Binsert5o
SET /a Turns=%Turns%+1
SET b2=_o__
SET currentply=%nickname%
GOTO CHECKWIN
CLS
GOTO VSpLAY
:Binsert5o
IF %b1% EQU _x__ GOTO full
IF %b1% EQU _o__ GOTO full
SET /a Turns=%Turns%+1
SET b1=_o__
SET currentply=%nickname%
GOTO CHECKWIN
CLS
GOTO VSpLAY
:Cinserto
IF %c5% EQU _x__ GOTO Cinsert2o
IF %c5% EQU _o__ GOTO Cinsert2o
SET /a Turns=%Turns%+1
SET c5=_o__
SET currentply=%nickname%
GOTO CHECKWIN
CLS
GOTO VSpLAY
:Cinsert2o
IF %c4% EQU _x__ GOTO Cinsert3o
IF %c4% EQU _o__ GOTO Cinsert3o
SET /a Turns=%Turns%+1
SET c4=_o__
SET currentply=%nickname%
GOTO CHECKWIN
CLS
GOTO VSpLAY
:Cinsert3o
IF %c3% EQU _x__ GOTO Cinsert4o
IF %c3% EQU _o__ GOTO Cinsert4o
SET /a Turns=%Turns%+1
SET c3=_o__
SET currentply=%nickname%
GOTO CHECKWIN
CLS
GOTO VSpLAY
:Cinsert4o
IF %c2% EQU _x__ GOTO Cinsert5o
IF %c2% EQU _o__ GOTO Cinsert5o
SET /a Turns=%Turns%+1
SET c2=_o__
SET currentply=%nickname%
GOTO CHECKWIN
CLS
GOTO VSpLAY
:Cinsert5o
IF %c1% EQU _x__ GOTO full
IF %c1% EQU _o__ GOTO full
SET /a Turns=%Turns%+1
SET c1=_o__
SET currentply=%nickname%
GOTO CHECKWIN
CLS
GOTO VSpLAY
:Dinserto
IF %d5% EQU _x__ GOTO Dinsert2o
IF %d5% EQU _o__ GOTO Dinsert2o
SET /a Turns=%Turns%+1
SET d5=_o__
SET currentply=%nickname%
GOTO CHECKWIN
CLS
GOTO VSpLAY
:Dinsert2o
IF %d4% EQU _x__ GOTO Dinsert3o
IF %d4% EQU _o__ GOTO Dinsert3o
SET /a Turns=%Turns%+1
SET d4=_o__
SET currentply=%nickname%
GOTO CHECKWIN
CLS
GOTO VSpLAY
:Dinsert3o
IF %d3% EQU _x__ GOTO Dinsert4o
IF %d3% EQU _o__ GOTO Dinsert4o
SET /a Turns=%Turns%+1
SET d3=_o__
SET currentply=%nickname%
GOTO CHECKWIN
CLS
GOTO VSpLAY
:Dinsert4o
IF %d2% EQU _x__ GOTO Dinsert5o
IF %d2% EQU _o__ GOTO Dinsert5o
SET /a Turns=%Turns%+1
SET d2=_o__
SET currentply=%nickname%
GOTO CHECKWIN
CLS
GOTO VSpLAY
:Dinsert5o
IF %d1% EQU _x__ GOTO full
IF %d1% EQU _o__ GOTO full
SET /a Turns=%Turns%+1
SET d1=_o__
SET currentply=%nickname%
GOTO CHECKWIN
CLS
GOTO VSpLAY
:Einserto
IF %e5% EQU _x__ GOTO Einsert2o
IF %e5% EQU _o__ GOTO Einsert2o
SET /a Turns=%Turns%+1
SET e5=_o__
SET currentply=%nickname%
GOTO CHECKWIN
CLS
GOTO VSpLAY
:Einsert2o
IF %e4% EQU _x__ GOTO Einsert3o
IF %e4% EQU _o__ GOTO Einsert3o
SET /a Turns=%Turns%+1
SET e4=_o__
SET currentply=%nickname%
GOTO CHECKWIN
CLS
GOTO VSpLAY
:Einsert3o
IF %e3% EQU _x__ GOTO Einsert4o
IF %e3% EQU _o__ GOTO Einsert4o
SET /a Turns=%Turns%+1
SET e3=_o__
SET currentply=%nickname%
GOTO CHECKWIN
CLS
GOTO VSpLAY
:Einsert4o
IF %e2% EQU _x__ GOTO Einsert5o
IF %e2% EQU _o__ GOTO Einsert5o
SET /a Turns=%Turns%+1
SET e2=_o__
SET currentply=%nickname%
GOTO CHECKWIN
CLS
GOTO VSpLAY
:Einsert5o
IF %e1% EQU _x__ GOTO full
IF %e1% EQU _o__ GOTO full
SET /a Turns=%Turns%+1
SET e1=_o__
SET currentply=%nickname%
GOTO CHECKWIN
CLS
GOTO VSpLAY
:CHECKWIN
IF %a1%+%a2%+%a3%+%a4% EQU _o__+_o__+_o__+_o__ GOTO WINP2
IF %a2%+%a3%+%a4%+%a5% EQU _o__+_o__+_o__+_o__ GOTO WINP2
IF %b1%+%b2%+%b3%+%b4% EQU _o__+_o__+_o__+_o__ GOTO WINP2
IF %b2%+%b3%+%b4%+%b5% EQU _o__+_o__+_o__+_o__ GOTO WINP2
IF %c1%+%c2%+%c3%+%c4% EQU _o__+_o__+_o__+_o__ GOTO WINP2
IF %c2%+%c3%+%c4%+%c5% EQU _o__+_o__+_o__+_o__ GOTO WINP2
IF %d1%+%d2%+%d3%+%d4% EQU _o__+_o__+_o__+_o__ GOTO WINP2
IF %d2%+%d3%+%d4%+%d5% EQU _o__+_o__+_o__+_o__ GOTO WINP2
IF %e1%+%e2%+%e3%+%e4% EQU _o__+_o__+_o__+_o__ GOTO WINP2
IF %e2%+%e3%+%e4%+%e5% EQU _o__+_o__+_o__+_o__ GOTO WINP2
IF %a1%+%b1%+%c1%+%d1% EQU _o__+_o__+_o__+_o__ GOTO WINP2
IF %b1%+%c1%+%d1%+%e1% EQU _o__+_o__+_o__+_o__ GOTO WINP2
IF %a2%+%b2%+%c2%+%d2% EQU _o__+_o__+_o__+_o__ GOTO WINP2
IF %b2%+%c2%+%d2%+%e2% EQU _o__+_o__+_o__+_o__ GOTO WINP2
IF %a3%+%b3%+%c3%+%d3% EQU _o__+_o__+_o__+_o__ GOTO WINP2
IF %b3%+%c3%+%d3%+%e3% EQU _o__+_o__+_o__+_o__ GOTO WINP2
IF %a4%+%b4%+%c4%+%d4% EQU _o__+_o__+_o__+_o__ GOTO WINP2
IF %b4%+%c4%+%d4%+%e4% EQU _o__+_o__+_o__+_o__ GOTO WINP2
IF %a5%+%b5%+%c5%+%d5% EQU _o__+_o__+_o__+_o__ GOTO WINP2
IF %b5%+%c5%+%d5%+%e5% EQU _o__+_o__+_o__+_o__ GOTO WINP2
IF %a1%+%b2%+%c3%+%d4% EQU _o__+_o__+_o__+_o__ GOTO WINP2
IF %b2%+%c3%+%d4%+%e5% EQU _o__+_o__+_o__+_o__ GOTO WINP2
IF %a1%+%b2%+%c3%+%d4% EQU _o__+_o__+_o__+_o__ GOTO WINP2
IF %b2%+%c3%+%d4%+%e5% EQU _o__+_o__+_o__+_o__ GOTO WINP2
IF %b1%+%c2%+%d3%+%e4% EQU _o__+_o__+_o__+_o__ GOTO WINP2
IF %a2%+%b3%+%c4%+%d5% EQU _o__+_o__+_o__+_o__ GOTO WINP2
IF %e1%+%d2%+%c3%+%b4% EQU _o__+_o__+_o__+_o__ GOTO WINP2
IF %e2%+%d3%+%c4%+%b5% EQU _o__+_o__+_o__+_o__ GOTO WINP2
IF %d1%+%c2%+%b3%+%a4% EQU _o__+_o__+_o__+_o__ GOTO WINP2
IF %a5%+%b4%+%c3%+%d2% EQU _o__+_o__+_o__+_o__ GOTO WINP2

IF %a1%+%a2%+%a3%+%a4% EQU _x__+_x__+_x__+_x__ GOTO WINP1
IF %a2%+%a3%+%a4%+%a5% EQU _x__+_x__+_x__+_x__ GOTO WINP1
IF %b1%+%b2%+%b3%+%b4% EQU _x__+_x__+_x__+_x__ GOTO WINP1
IF %b2%+%b3%+%b4%+%b5% EQU _x__+_x__+_x__+_x__ GOTO WINP1
IF %c1%+%c2%+%c3%+%c4% EQU _x__+_x__+_x__+_x__ GOTO WINP1
IF %c2%+%c3%+%c4%+%c5% EQU _x__+_x__+_x__+_x__ GOTO WINP1
IF %d1%+%d2%+%d3%+%d4% EQU _x__+_x__+_x__+_x__ GOTO WINP1
IF %d2%+%d3%+%d4%+%d5% EQU _x__+_x__+_x__+_x__ GOTO WINP1
IF %e1%+%e2%+%e3%+%e4% EQU _x__+_x__+_x__+_x__ GOTO WINP1
IF %e2%+%e3%+%e4%+%e5% EQU _x__+_x__+_x__+_x__ GOTO WINP1
IF %a1%+%b1%+%c1%+%d1% EQU _x__+_x__+_x__+_x__ GOTO WINP1
IF %b1%+%c1%+%d1%+%e1% EQU _x__+_x__+_x__+_x__ GOTO WINP1
IF %a2%+%b2%+%c2%+%d2% EQU _x__+_x__+_x__+_x__ GOTO WINP1
IF %b2%+%c2%+%d2%+%e2% EQU _x__+_x__+_x__+_x__ GOTO WINP1
IF %a3%+%b3%+%c3%+%d3% EQU _x__+_x__+_x__+_x__ GOTO WINP1
IF %b3%+%c3%+%d3%+%e3% EQU _x__+_x__+_x__+_x__ GOTO WINP1
IF %a4%+%b4%+%c4%+%d4% EQU _x__+_x__+_x__+_x__ GOTO WINP1
IF %b4%+%c4%+%d4%+%e4% EQU _x__+_x__+_x__+_x__ GOTO WINP1
IF %a5%+%b5%+%c5%+%d5% EQU _x__+_x__+_x__+_x__ GOTO WINP1
IF %b5%+%c5%+%d5%+%e5% EQU _x__+_x__+_x__+_x__ GOTO WINP1
IF %a1%+%b2%+%c3%+%d4% EQU _x__+_x__+_x__+_x__ GOTO WINP1
IF %b2%+%c3%+%d4%+%e5% EQU _x__+_x__+_x__+_x__ GOTO WINP1
IF %a1%+%b2%+%c3%+%d4% EQU _x__+_x__+_x__+_x__ GOTO WINP1
IF %b2%+%c3%+%d4%+%e5% EQU _x__+_x__+_x__+_x__ GOTO WINP1
IF %b1%+%c2%+%d3%+%e4% EQU _x__+_x__+_x__+_x__ GOTO WINP1
IF %a2%+%b3%+%c4%+%d5% EQU _x__+_x__+_x__+_x__ GOTO WINP1
IF %e1%+%d2%+%c3%+%b4% EQU _x__+_x__+_x__+_x__ GOTO WINP1
IF %e2%+%d3%+%c4%+%b5% EQU _x__+_x__+_x__+_x__ GOTO WINP1
IF %d1%+%c2%+%b3%+%a4% EQU _x__+_x__+_x__+_x__ GOTO WINP1
IF %a5%+%b4%+%c3%+%d2% EQU _x__+_x__+_x__+_x__ GOTO WINP1
IF %Turns% EQU 20 GOTO Tie
CLS
GOTO VSpLAY
:WINP2
PING -n 3 0.0.0.0 >nul
CLS
ECHO "   ___  _____  _  _  _  _  ___   ___  ____    ____  _____  __
ECHO "  / __)(  _  )( \( )( \( )(__ ) / __)(_  _)  ( ___)(  _  )/. |
ECHO " ( (__  )(_)(  )  (  )  (  (_ \( (     )(     )__)  )(_)((_  _)
ECHO "  \___)(_____)(_)\_)(_)\_)(___/ \___) (__)   (__)  (_____) (_)
ECHO "
ECHO "_____________________________________________________________________
ECHO "%nickname2% is the:
ECHO " _    _  ____  _  _  _  _  ____  ____ /\/\/\
ECHO "( \/\/ )(_  _)( \( )( \( )( ___)(  _ \)()()(
ECHO " )    (  _)(_  )  (  )  (  )__)  )   /\/\/\/
ECHO "(__/\__)(____)(_)\_)(_)\_)(____)(_)\_)()()()
ECHO "
ECHO "Better luck next time, %nickname%!
ECHO "Press 'x' To Exit and 'm' To go back to the MainMenu.
COLOR 01
PING -n 2 0.0.0.0 >nul
COLOR 02
PING -n 2 0.0.0.0 >nul
COLOR 0c
PING -n 2 0.0.0.0 >nul
COLOR 0d
PING -n 2 0.0.0.0 >nul
CHOICE /c xm /n >nul
IF "%errorlevel%"=="1" EXIT
IF "%errorlevel%"=="2" START menu_2.bat
EXIT
:WINP1
PING -n 3 0.0.0.0 >nul
CLS
ECHO "   ___  _____  _  _  _  _  ___   ___  ____    ____  _____  __
ECHO "  / __)(  _  )( \( )( \( )(__ ) / __)(_  _)  ( ___)(  _  )/. |
ECHO " ( (__  )(_)(  )  (  )  (  (_ \( (     )(     )__)  )(_)((_  _)
ECHO "  \___)(_____)(_)\_)(_)\_)(___/ \___) (__)   (__)  (_____) (_)
ECHO "
ECHO "_____________________________________________________________________
ECHO "%nickname% is the:
ECHO " _    _  ____  _  _  _  _  ____  ____ /\/\/\
ECHO "( \/\/ )(_  _)( \( )( \( )( ___)(  _ \)()()(
ECHO " )    (  _)(_  )  (  )  (  )__)  )   /\/\/\/
ECHO "(__/\__)(____)(_)\_)(_)\_)(____)(_)\_)()()()
ECHO "
ECHO "Better luck next time, %nickname2%!
ECHO "Press 'x' To Exit and 'm' To go back to the MainMenu.
COLOR 01
PING -n 2 0.0.0.0 >nul
COLOR 02
PING -n 2 0.0.0.0 >nul
COLOR 0c
PING -n 2 0.0.0.0 >nul
COLOR 0d
PING -n 2 0.0.0.0 >nul
CHOICE /c xm /n >nul
IF "%errorlevel%"=="1" EXIT
IF "%errorlevel%"=="2" START menu_2.bat
EXIT
:FULL
ECHO This Row is full please choose another one.
PING -n 3 0.0.0.0 >nul
CLS
GOTO VSpLAY
:Tie
PING -n 3 0.0.0.0 >nul
ECHO "   ___  _____  _  _  _  _  ___   ___  ____    ____  _____  __
ECHO "  / __)(  _  )( \( )( \( )(__ ) / __)(_  _)  ( ___)(  _  )/. |
ECHO " ( (__  )(_)(  )  (  )  (  (_ \( (     )(     )__)  )(_)((_  _)
ECHO "  \___)(_____)(_)\_)(_)\_)(___/ \___) (__)   (__)  (_____) (_)
ECHO "
ECHO "_____________________________________________________________________
ECHO "
ECHO "              ___  ____/ ___      __
ECHO "             (_  _)(_  _)/ __)    /__\  ()
ECHO "              _)(_   )(  \__ \   /(__)\
ECHO "             (____) (__) (___/  (__)(__)()
ECHO "              ____  ____  ____   _   _
ECHO "             (_  _)(_  _)( ___) / \ / \
ECHO "               )(   _)(_  )__) (   |   )
ECHO "              (__) (____)(____) \_/ \_/
ECHO "                                (_) (_)
ECHO "
ECHO "              Between %Nickname% And %Nickname2%!!
ECHO "Press 'x' To Exit and 'm' To go back to the MainMenu.
CHOICE /c xm /n >nul
IF "%errorlevel%"=="1" EXIT
IF "%errorlevel%"=="2" START menu_2.bat
EXIT
:EXIT
EXIT
```
vspc.bat


```
@ECHO OFF
@mode con cols=74 lines=35
@TITLE CoN3Ct FO4 V 1.0
color 0
Set _ColVal=9ACDF
Set /A _Num=%random% %% 5
Call Set _Color=%%_ColVal:~%_Num%,1%%
Color 0%_Color%
:settings
SET nickname=Me
ECHO Player 1, Type Your Nickname, You will play as X's:
set /p nickname=
CLS
GOTO vsmulti
:vsmulti
SET a1=____
SET a2=____
SET a3=____
SET a4=____
SET a5=____
SET b1=____
SET b2=____
SET b3=____
SET b4=____
SET b5=____
SET c1=____
SET c2=____
SET c3=____
SET c4=____
SET c5=____
SET d1=____
SET d2=____
SET d3=____
SET d4=____
SET d5=____
SET e1=____
SET e2=____
SET e3=____
SET e4=____
SET e5=____
SET /a Turns=0
SET PC=CPU
SET currentply=%nickname%
:VSpLAY
ECHO "Type where to insert your playing piece (A, B, C, D, E)
ECHO " Turns:%Turns%
ECHO " It's %currentply%'s Turn.
ECHO "
ECHO "        _______________________________________
ECHO "       /___A______B______C______D______E_____ /|
ECHO "      |  (%a1%) (%b1%) (%c1%) (%d1%) (%e1%)  |/|
ECHO "      |    ||     ||     ||     ||     ||    |/|
ECHO "      |  (%a2%) (%b2%) (%c2%) (%d2%) (%e2%)  |/|
ECHO "      |    ||     ||     ||     ||     ||    |/|
ECHO "      |  (%a3%) (%b3%) (%c3%) (%d3%) (%e3%)  |/|______________
ECHO "      |    ||     ||     ||     ||     ||    |/|            / |
ECHO "      |  (%a4%) (%b4%) (%c4%) (%d4%) (%e4%)  |/|_          /  |
ECHO "      |    ||     ||     ||     ||     ||    |/|/|        /   |
ECHO "      |  (%a5%) (%b5%) (%c5%) (%d5%) (%e5%)  |/|/        / /| |
ECHO "     /|______________________________________|//        / / | |
ECHO "    //______________________________________///        / /__|/
ECHO "   / \______________________________________\/        / /
ECHO "  /__________________________________________________/ /
ECHO "  |   ____________________________________________   | |
ECHO "  |  | |                                          |  | |
ECHO "  |  | |                                          |  | |
ECHO "  |__|/                                           |__|/
ECHO "
ECHO "*************************************************************************
IF %currentply% EQU %nickname% GOTO CHOICEX
IF %currentply% EQU %PC% GOTO PCply
:CHOICEX
CHOICE /c abcde /n >nul
IF "%errorlevel%"=="1" GOTO Ainsert 
IF "%errorlevel%"=="2" GOTO Binsert 
IF "%errorlevel%"=="3" GOTO Cinsert 
IF "%errorlevel%"=="4" GOTO Dinsert
IF "%errorlevel%"=="5" GOTO Einsert 
:PCply
PING -n 2 0.0.0.0 >nul
Set /A PCRAND="%RANDOM% %% 6"
IF %PCRAND% EQU 1 GOTO Ainserto
IF %PCRAND% EQU 2 GOTO Binserto
IF %PCRAND% EQU 3 GOTO Cinserto
IF %PCRAND% EQU 4 GOTO Dinserto
IF %PCRAND% EQU 5 GOTO Einserto
:Ainsert
IF %a5% EQU _x__ GOTO Ainsert2
IF %a5% EQU _o__ GOTO Ainsert2
SET /a Turns=%Turns%+1
SET a5=_x__
SET currentply=%PC%
GOTO CHECKWIN
:Ainsert2
IF %a4% EQU _x__ GOTO Ainsert3
IF %a4% EQU _o__ GOTO Ainsert3
SET /a Turns=%Turns%+1
SET a4=_x__
SET currentply=%PC%
GOTO CHECKWIN
:Ainsert3
IF %a3% EQU _x__ GOTO Ainsert4
IF %a3% EQU _o__ GOTO Ainsert4
SET /a Turns=%Turns%+1
SET a3=_x__
SET currentply=%PC%
GOTO CHECKWIN
:Ainsert4
IF %a2% EQU _x__ GOTO Ainsert5
IF %a2% EQU _o__ GOTO Ainsert5
SET /a Turns=%Turns%+1
SET a2=_x__
SET currentply=%PC%
GOTO CHECKWIN
:Ainsert5
IF %a1% EQU _x__ GOTO full
IF %a1% EQU _o__ GOTO full
SET /a Turns=%Turns%+1
SET a1=_x__
SET currentply=%PC%
GOTO CHECKWIN
:Binsert
IF %b5% EQU _x__ GOTO Binsert2
IF %b5% EQU _o__ GOTO Binsert2
SET /a Turns=%Turns%+1
SET b5=_x__
SET currentply=%PC%
GOTO CHECKWIN
:Binsert2
IF %b4% EQU _x__ GOTO Binsert3
IF %b4% EQU _o__ GOTO Binsert3
SET /a Turns=%Turns%+1
SET b4=_x__
SET currentply=%PC%
GOTO CHECKWIN
:Binsert3
IF %b3% EQU _x__ GOTO Binsert4
IF %b3% EQU _o__ GOTO Binsert4
SET /a Turns=%Turns%+1
SET b3=_x__
SET currentply=%PC%
GOTO CHECKWIN
:Binsert4
IF %b2% EQU _x__ GOTO Binsert5
IF %b2% EQU _o__ GOTO Binsert5
SET /a Turns=%Turns%+1
SET b2=_x__
SET currentply=%PC%
GOTO CHECKWIN
:Binsert5
IF %b1% EQU _x__ GOTO full
IF %b1% EQU _o__ GOTO full
SET /a Turns=%Turns%+1
SET b1=_x__
SET currentply=%PC%
GOTO CHECKWIN
:Cinsert
IF %c5% EQU _x__ GOTO Cinsert2
IF %c5% EQU _o__ GOTO Cinsert2
SET /a Turns=%Turns%+1
SET c5=_x__
SET currentply=%PC%
GOTO CHECKWIN
:Cinsert2
IF %c4% EQU _x__ GOTO Cinsert3
IF %c4% EQU _o__ GOTO Cinsert3
SET /a Turns=%Turns%+1
SET c4=_x__
SET currentply=%PC%
GOTO CHECKWIN
:Cinsert3
IF %c3% EQU _x__ GOTO Cinsert4
IF %c3% EQU _o__ GOTO Cinsert4
SET /a Turns=%Turns%+1
SET c3=_x__
SET currentply=%PC%
GOTO CHECKWIN
:Cinsert4
IF %c2% EQU _x__ GOTO Cinsert5
IF %c2% EQU _o__ GOTO Cinsert5
SET /a Turns=%Turns%+1
SET c2=_x__
SET currentply=%PC%
GOTO CHECKWIN
:Cinsert5
IF %c1% EQU _x__ GOTO full
IF %c1% EQU _o__ GOTO full
SET /a Turns=%Turns%+1
SET c1=_x__
SET currentply=%PC%
GOTO CHECKWIN
:Dinsert
IF %d5% EQU _x__ GOTO Dinsert2
IF %d5% EQU _o__ GOTO Dinsert2
SET /a Turns=%Turns%+1
SET d5=_x__
SET currentply=%PC%
GOTO CHECKWIN
:Dinsert2
IF %d4% EQU _x__ GOTO Dinsert3
IF %d4% EQU _o__ GOTO Dinsert3
SET /a Turns=%Turns%+1
SET d4=_x__
SET currentply=%PC%
GOTO CHECKWIN
:Dinsert3
IF %d3% EQU _x__ GOTO Dinsert4
IF %d3% EQU _o__ GOTO Dinsert4
SET /a Turns=%Turns%+1
SET d3=_x__
SET currentply=%PC%
GOTO CHECKWIN
:Dinsert4
IF %d2% EQU _x__ GOTO Dinsert5
IF %d2% EQU _o__ GOTO Dinsert5
SET /a Turns=%Turns%+1
SET d2=_x__
SET currentply=%PC%
GOTO CHECKWIN
:Dinsert5
IF %d1% EQU _x__ GOTO full
IF %d1% EQU _o__ GOTO full
SET /a Turns=%Turns%+1
SET d1=_x__
SET currentply=%PC%
GOTO CHECKWIN
:Einsert
IF %e5% EQU _x__ GOTO Einsert2
IF %e5% EQU _o__ GOTO Einsert2
SET /a Turns=%Turns%+1
SET e5=_x__
SET currentply=%PC%
GOTO CHECKWIN
:Einsert2
IF %e4% EQU _x__ GOTO Einsert3
IF %e4% EQU _o__ GOTO Einsert3
SET /a Turns=%Turns%+1
SET e4=_x__
SET currentply=%PC%
GOTO CHECKWIN
:Einsert3
IF %e3% EQU _x__ GOTO Einsert4
IF %e3% EQU _o__ GOTO Einsert4
SET /a Turns=%Turns%+1
SET e3=_x__
SET currentply=%PC%
GOTO CHECKWIN
:Einsert4
IF %e2% EQU _x__ GOTO Einsert5
IF %e2% EQU _o__ GOTO Einsert5
SET /a Turns=%Turns%+1
SET e2=_x__
SET currentply=%PC%
GOTO CHECKWIN
:Einsert5
IF %e1% EQU _x__ GOTO full
IF %e1% EQU _o__ GOTO full
SET /a Turns=%Turns%+1
SET e1=_x__
SET currentply=%PC%
GOTO CHECKWIN
CLS
:Ainserto
IF %a5% EQU _x__ GOTO Ainsert2o
IF %a5% EQU _o__ GOTO Ainsert2o
SET /a Turns=%Turns%+1
SET a5=_o__
SET currentply=%nickname%
GOTO CHECKWIN
CLS
GOTO VSpLAY
:Ainsert2o
IF %a4% EQU _x__ GOTO Ainsert3o
IF %a4% EQU _o__ GOTO Ainsert3o
SET /a Turns=%Turns%+1
SET a4=_o__
SET currentply=%nickname%
GOTO CHECKWIN
CLS
GOTO VSpLAY
:Ainsert3o
IF %a3% EQU _x__ GOTO Ainsert4o
IF %a3% EQU _o__ GOTO Ainsert4o
SET /a Turns=%Turns%+1
SET a3=_o__
SET currentply=%nickname%
GOTO CHECKWIN
CLS
GOTO VSpLAY
:Ainsert4o
IF %a2% EQU _x__ GOTO Ainsert5o
IF %a2% EQU _o__ GOTO Ainsert5o
SET /a Turns=%Turns%+1
SET a2=_o__
SET currentply=%nickname%
GOTO CHECKWIN
CLS
GOTO VSpLAY
:Ainsert5o
IF %a1% EQU _x__ GOTO PCply
IF %a1% EQU _o__ GOTO PCply
SET /a Turns=%Turns%+1
SET a1=_o__
SET currentply=%nickname%
GOTO CHECKWIN
CLS
GOTO VSpLAY
:Binserto
IF %b5% EQU _x__ GOTO Binsert2o
IF %b5% EQU _o__ GOTO Binsert2o
SET /a Turns=%Turns%+1
SET b5=_o__
SET currentply=%nickname%
GOTO CHECKWIN
CLS
GOTO VSpLAY
:Binsert2o
IF %b4% EQU _x__ GOTO Binsert3o
IF %b4% EQU _o__ GOTO Binsert3o
SET /a Turns=%Turns%+1
SET b4=_o__
SET currentply=%nickname%
GOTO CHECKWIN
CLS
GOTO VSpLAY
:Binsert3o
IF %b3% EQU _x__ GOTO Binsert4o
IF %b3% EQU _o__ GOTO Binsert4o
SET /a Turns=%Turns%+1
SET b3=_o__
SET currentply=%nickname%
GOTO CHECKWIN
CLS
GOTO VSpLAY
:Binsert4o
IF %b2% EQU _x__ GOTO Binsert5o
IF %b2% EQU _o__ GOTO Binsert5o
SET /a Turns=%Turns%+1
SET b2=_o__
SET currentply=%nickname%
GOTO CHECKWIN
CLS
GOTO VSpLAY
:Binsert5o
IF %b1% EQU _x__ GOTO PCply
IF %b1% EQU _o__ GOTO PCply
SET /a Turns=%Turns%+1
SET b1=_o__
SET currentply=%nickname%
GOTO CHECKWIN
CLS
GOTO VSpLAY
:Cinserto
IF %c5% EQU _x__ GOTO Cinsert2o
IF %c5% EQU _o__ GOTO Cinsert2o
SET /a Turns=%Turns%+1
SET c5=_o__
SET currentply=%nickname%
GOTO CHECKWIN
CLS
GOTO VSpLAY
:Cinsert2o
IF %c4% EQU _x__ GOTO Cinsert3o
IF %c4% EQU _o__ GOTO Cinsert3o
SET /a Turns=%Turns%+1
SET c4=_o__
SET currentply=%nickname%
GOTO CHECKWIN
CLS
GOTO VSpLAY
:Cinsert3o
IF %c3% EQU _x__ GOTO Cinsert4o
IF %c3% EQU _o__ GOTO Cinsert4o
SET /a Turns=%Turns%+1
SET c3=_o__
SET currentply=%nickname%
GOTO CHECKWIN
CLS
GOTO VSpLAY
:Cinsert4o
IF %c2% EQU _x__ GOTO Cinsert5o
IF %c2% EQU _o__ GOTO Cinsert5o
SET /a Turns=%Turns%+1
SET c2=_o__
SET currentply=%nickname%
GOTO CHECKWIN
CLS
GOTO VSpLAY
:Cinsert5o
IF %c1% EQU _x__ GOTO PCply
IF %c1% EQU _o__ GOTO PCply
SET /a Turns=%Turns%+1
SET c1=_o__
SET currentply=%nickname%
GOTO CHECKWIN
CLS
GOTO VSpLAY
:Dinserto
IF %d5% EQU _x__ GOTO Dinsert2o
IF %d5% EQU _o__ GOTO Dinsert2o
SET /a Turns=%Turns%+1
SET d5=_o__
SET currentply=%nickname%
GOTO CHECKWIN
CLS
GOTO VSpLAY
:Dinsert2o
IF %d4% EQU _x__ GOTO Dinsert3o
IF %d4% EQU _o__ GOTO Dinsert3o
SET /a Turns=%Turns%+1
SET d4=_o__
SET currentply=%nickname%
GOTO CHECKWIN
CLS
GOTO VSpLAY
:Dinsert3o
IF %d3% EQU _x__ GOTO Dinsert4o
IF %d3% EQU _o__ GOTO Dinsert4o
SET /a Turns=%Turns%+1
SET d3=_o__
SET currentply=%nickname%
GOTO CHECKWIN
CLS
GOTO VSpLAY
:Dinsert4o
IF %d2% EQU _x__ GOTO Dinsert5o
IF %d2% EQU _o__ GOTO Dinsert5o
SET /a Turns=%Turns%+1
SET d2=_o__
SET currentply=%nickname%
GOTO CHECKWIN
CLS
GOTO VSpLAY
:Dinsert5o
IF %d1% EQU _x__ GOTO PCply
IF %d1% EQU _o__ GOTO PCply
SET /a Turns=%Turns%+1
SET d1=_o__
SET currentply=%nickname%
GOTO CHECKWIN
CLS
GOTO VSpLAY
:Einserto
IF %e5% EQU _x__ GOTO Einsert2o
IF %e5% EQU _o__ GOTO Einsert2o
SET /a Turns=%Turns%+1
SET e5=_o__
SET currentply=%nickname%
GOTO CHECKWIN
CLS
GOTO VSpLAY
:Einsert2o
IF %e4% EQU _x__ GOTO Einsert3o
IF %e4% EQU _o__ GOTO Einsert3o
SET /a Turns=%Turns%+1
SET e4=_o__
SET currentply=%nickname%
GOTO CHECKWIN
CLS
GOTO VSpLAY
:Einsert3o
IF %e3% EQU _x__ GOTO Einsert4o
IF %e3% EQU _o__ GOTO Einsert4o
SET /a Turns=%Turns%+1
SET e3=_o__
SET currentply=%nickname%
GOTO CHECKWIN
CLS
GOTO VSpLAY
:Einsert4o
IF %e2% EQU _x__ GOTO Einsert5o
IF %e2% EQU _o__ GOTO Einsert5o
SET /a Turns=%Turns%+1
SET e2=_o__
SET currentply=%nickname%
GOTO CHECKWIN
CLS
GOTO VSpLAY
:Einsert5o
IF %e1% EQU _x__ GOTO PCply
IF %e1% EQU _o__ GOTO PCply
SET /a Turns=%Turns%+1
SET e1=_o__
SET currentply=%nickname%
GOTO CHECKWIN
CLS
GOTO VSpLAY
:CHECKWIN
IF %a1%+%a2%+%a3%+%a4% EQU _o__+_o__+_o__+_o__ GOTO lose
IF %a2%+%a3%+%a4%+%a5% EQU _o__+_o__+_o__+_o__ GOTO lose
IF %b1%+%b2%+%b3%+%b4% EQU _o__+_o__+_o__+_o__ GOTO lose
IF %b2%+%b3%+%b4%+%b5% EQU _o__+_o__+_o__+_o__ GOTO lose
IF %c1%+%c2%+%c3%+%c4% EQU _o__+_o__+_o__+_o__ GOTO lose
IF %c2%+%c3%+%c4%+%c5% EQU _o__+_o__+_o__+_o__ GOTO lose
IF %d1%+%d2%+%d3%+%d4% EQU _o__+_o__+_o__+_o__ GOTO lose
IF %d2%+%d3%+%d4%+%d5% EQU _o__+_o__+_o__+_o__ GOTO lose
IF %e1%+%e2%+%e3%+%e4% EQU _o__+_o__+_o__+_o__ GOTO lose
IF %e2%+%e3%+%e4%+%e5% EQU _o__+_o__+_o__+_o__ GOTO lose
IF %a1%+%b1%+%c1%+%d1% EQU _o__+_o__+_o__+_o__ GOTO lose
IF %b1%+%c1%+%d1%+%e1% EQU _o__+_o__+_o__+_o__ GOTO lose
IF %a2%+%b2%+%c2%+%d2% EQU _o__+_o__+_o__+_o__ GOTO lose
IF %b2%+%c2%+%d2%+%e2% EQU _o__+_o__+_o__+_o__ GOTO lose
IF %a3%+%b3%+%c3%+%d3% EQU _o__+_o__+_o__+_o__ GOTO lose
IF %b3%+%c3%+%d3%+%e3% EQU _o__+_o__+_o__+_o__ GOTO lose
IF %a4%+%b4%+%c4%+%d4% EQU _o__+_o__+_o__+_o__ GOTO lose
IF %b4%+%c4%+%d4%+%e4% EQU _o__+_o__+_o__+_o__ GOTO lose
IF %a5%+%b5%+%c5%+%d5% EQU _o__+_o__+_o__+_o__ GOTO lose
IF %b5%+%c5%+%d5%+%e5% EQU _o__+_o__+_o__+_o__ GOTO lose
IF %a1%+%b2%+%c3%+%d4% EQU _o__+_o__+_o__+_o__ GOTO lose
IF %b2%+%c3%+%d4%+%e5% EQU _o__+_o__+_o__+_o__ GOTO lose
IF %a1%+%b2%+%c3%+%d4% EQU _o__+_o__+_o__+_o__ GOTO lose
IF %b2%+%c3%+%d4%+%e5% EQU _o__+_o__+_o__+_o__ GOTO lose
IF %b1%+%c2%+%d3%+%e4% EQU _o__+_o__+_o__+_o__ GOTO lose
IF %a2%+%b3%+%c4%+%d5% EQU _o__+_o__+_o__+_o__ GOTO lose
IF %e1%+%d2%+%c3%+%b4% EQU _o__+_o__+_o__+_o__ GOTO lose
IF %e2%+%d3%+%c4%+%b5% EQU _o__+_o__+_o__+_o__ GOTO lose
IF %d1%+%c2%+%b3%+%a4% EQU _o__+_o__+_o__+_o__ GOTO lose
IF %a5%+%b4%+%c3%+%d2% EQU _o__+_o__+_o__+_o__ GOTO lose

IF %a1%+%a2%+%a3%+%a4% EQU _x__+_x__+_x__+_x__ GOTO WINP1
IF %a2%+%a3%+%a4%+%a5% EQU _x__+_x__+_x__+_x__ GOTO WINP1
IF %b1%+%b2%+%b3%+%b4% EQU _x__+_x__+_x__+_x__ GOTO WINP1
IF %b2%+%b3%+%b4%+%b5% EQU _x__+_x__+_x__+_x__ GOTO WINP1
IF %c1%+%c2%+%c3%+%c4% EQU _x__+_x__+_x__+_x__ GOTO WINP1
IF %c2%+%c3%+%c4%+%c5% EQU _x__+_x__+_x__+_x__ GOTO WINP1
IF %d1%+%d2%+%d3%+%d4% EQU _x__+_x__+_x__+_x__ GOTO WINP1
IF %d2%+%d3%+%d4%+%d5% EQU _x__+_x__+_x__+_x__ GOTO WINP1
IF %e1%+%e2%+%e3%+%e4% EQU _x__+_x__+_x__+_x__ GOTO WINP1
IF %e2%+%e3%+%e4%+%e5% EQU _x__+_x__+_x__+_x__ GOTO WINP1
IF %a1%+%b1%+%c1%+%d1% EQU _x__+_x__+_x__+_x__ GOTO WINP1
IF %b1%+%c1%+%d1%+%e1% EQU _x__+_x__+_x__+_x__ GOTO WINP1
IF %a2%+%b2%+%c2%+%d2% EQU _x__+_x__+_x__+_x__ GOTO WINP1
IF %b2%+%c2%+%d2%+%e2% EQU _x__+_x__+_x__+_x__ GOTO WINP1
IF %a3%+%b3%+%c3%+%d3% EQU _x__+_x__+_x__+_x__ GOTO WINP1
IF %b3%+%c3%+%d3%+%e3% EQU _x__+_x__+_x__+_x__ GOTO WINP1
IF %a4%+%b4%+%c4%+%d4% EQU _x__+_x__+_x__+_x__ GOTO WINP1
IF %b4%+%c4%+%d4%+%e4% EQU _x__+_x__+_x__+_x__ GOTO WINP1
IF %a5%+%b5%+%c5%+%d5% EQU _x__+_x__+_x__+_x__ GOTO WINP1
IF %b5%+%c5%+%d5%+%e5% EQU _x__+_x__+_x__+_x__ GOTO WINP1
IF %a1%+%b2%+%c3%+%d4% EQU _x__+_x__+_x__+_x__ GOTO WINP1
IF %b2%+%c3%+%d4%+%e5% EQU _x__+_x__+_x__+_x__ GOTO WINP1
IF %a1%+%b2%+%c3%+%d4% EQU _x__+_x__+_x__+_x__ GOTO WINP1
IF %b2%+%c3%+%d4%+%e5% EQU _x__+_x__+_x__+_x__ GOTO WINP1
IF %b1%+%c2%+%d3%+%e4% EQU _x__+_x__+_x__+_x__ GOTO WINP1
IF %a2%+%b3%+%c4%+%d5% EQU _x__+_x__+_x__+_x__ GOTO WINP1
IF %e1%+%d2%+%c3%+%b4% EQU _x__+_x__+_x__+_x__ GOTO WINP1
IF %e2%+%d3%+%c4%+%b5% EQU _x__+_x__+_x__+_x__ GOTO WINP1
IF %d1%+%c2%+%b3%+%a4% EQU _x__+_x__+_x__+_x__ GOTO WINP1
IF %a5%+%b4%+%c3%+%d2% EQU _x__+_x__+_x__+_x__ GOTO WINP1
IF %Turns% EQU 21 GOTO Tie
CLS
GOTO VSpLAY
:full
ECHO This Row is full please choose another one.
PING -n 3 0.0.0.0 >nul
CLS
GOTO VSpLAY
:WINP1
CLS
ECHO "   ___  _____  _  _  _  _  ___   ___  ____    ____  _____  __
ECHO "  / __)(  _  )( \( )( \( )(__ ) / __)(_  _)  ( ___)(  _  )/. |
ECHO " ( (__  )(_)(  )  (  )  (  (_ \( (     )(     )__)  )(_)((_  _)
ECHO "  \___)(_____)(_)\_)(_)\_)(___/ \___) (__)   (__)  (_____) (_)
ECHO "
ECHO "_____________________________________________________________________
ECHO "%nickname% is the:
ECHO " _    _  ____  _  _  _  _  ____  ____ /\/\/\
ECHO "( \/\/ )(_  _)( \( )( \( )( ___)(  _ \)()()(
ECHO " )    (  _)(_  )  (  )  (  )__)  )   /\/\/\/
ECHO "(__/\__)(____)(_)\_)(_)\_)(____)(_)\_)()()()
ECHO "
ECHO "Better luck next time, %PC%!
ECHO "Press 'x' To Exit and 'm' To go back to the MainMenu.
COLOR 01
PING -n 2 0.0.0.0 >nul
COLOR 02
PING -n 2 0.0.0.0 >nul
COLOR 0c
PING -n 2 0.0.0.0 >nul
COLOR 0d
PING -n 2 0.0.0.0 >nul
CHOICE /c xm /n >nul
IF "%errorlevel%"=="1" EXIT
IF "%errorlevel%"=="2" START menu_2.bat
EXIT
:lose
CLS
ECHO "   ___  _____  _  _  _  _  ___   ___  ____    ____  _____  __
ECHO "  / __)(  _  )( \( )( \( )(__ ) / __)(_  _)  ( ___)(  _  )/. |
ECHO " ( (__  )(_)(  )  (  )  (  (_ \( (     )(     )__)  )(_)((_  _)
ECHO "  \___)(_____)(_)\_)(_)\_)(___/ \___) (__)   (__)  (_____) (_)
ECHO "
ECHO "_____________________________________________________________________
ECHO "     __    _____  ___  ____  ____
ECHO "    (  )  (  _  )/ __)( ___)(  _ \
ECHO "     )(__  )(_)( \__ \ )__)  )   / _  _  _
ECHO "    (____)(_____)(___/(____)(_)\_)(_)(_)(_)
ECHO "
ECHO "    Better luck next time, %nickname%...
ECHO "Press 'x' To Exit and 'm' To go back to the MainMenu.
CHOICE /c xm /n >nul
IF "%errorlevel%"=="1" EXIT
IF "%errorlevel%"=="2" START menu_2.bat
EXIT
 
:Tie
CLS
ECHO "   ___  _____  _  _  _  _  ___   ___  ____    ____  _____  __
ECHO "  / __)(  _  )( \( )( \( )(__ ) / __)(_  _)  ( ___)(  _  )/. |
ECHO " ( (__  )(_)(  )  (  )  (  (_ \( (     )(     )__)  )(_)((_  _)
ECHO "  \___)(_____)(_)\_)(_)\_)(___/ \___) (__)   (__)  (_____) (_)
ECHO "
ECHO "_____________________________________________________________________
ECHO "
ECHO "              ___  ____/ ___      __
ECHO "             (_  _)(_  _)/ __)    /__\  ()
ECHO "              _)(_   )(  \__ \   /(__)\
ECHO "             (____) (__) (___/  (__)(__)()
ECHO "              ____  ____  ____   _   _
ECHO "             (_  _)(_  _)( ___) / \ / \
ECHO "               )(   _)(_  )__) (   |   )
ECHO "              (__) (____)(____) \_/ \_/
ECHO "                                (_) (_)
ECHO "
ECHO "              Between %Nickname% And The %PC%!!
ECHO "Press 'x' To Exit and 'm' To go back to the MainMenu.
CHOICE /c xm /n >nul
IF "%errorlevel%"=="1" EXIT
IF "%errorlevel%"=="2" START menu_2.bat
EXIT
```
seifpic.txt :


```
, [EMAIL="[email protected]@#[email protected]@@@Qga"][email protected]@#[email protected]@@@Qga[/EMAIL],
                  [EMAIL="[email protected]@@qJ"][email protected]@@qJ[/EMAIL]
              [EMAIL="JN#[email protected]##g"]JN#Ajjjjjjjjj[email protected]##g[/EMAIL]
          . @M#[email protected]###y
         [EMAIL="[email protected]####g"][email protected]####g[/EMAIL]
        @%%%%[email protected]######y
      [EMAIL="[email protected]@########Q"][email protected]@########Q[/EMAIL]
     [EMAIL="[email protected]&&&&&&&[email protected]"][email protected]&&&&&&&[email protected][/EMAIL]####@##@.
    [EMAIL="[email protected]@[email protected]@@QMMMNN"][email protected]@[email protected]@@QMMMNN[/EMAIL]########@.
   JRRBBBgggggOgOOOOgOgOOgOgOgggBBRRRWWWW%QQQQQMNNN#######G
   BBBggggOOOOOOOOOOOOOOOOgOgggggBBRRWWWW%%%QQQMMNNN#######e
  JBggD^   [EMAIL="[email protected]"][email protected][/EMAIL]#  QD=  @ROOggB$ JMWWWW%QQ#!,J,JN######K
  @ggOc [EMAIL="[email protected]"==1Q#==H"][email protected]"==1Q#==H[/EMAIL]^  |D=2"=3WK=|Q#"^="@H|H+J,0p0#####@
  ggOOOq,   JK  9!  H  QK  @l  @; JK  D  [EMAIL="[email protected]"][email protected][/EMAIL] [EMAIL="N#@KJN"]N#@KJN[/EMAIL]#####
  OgOO. JW!  G  @Y90#  @K  Ml  9^ JK  @. [EMAIL="[email protected],J#|QN"][email protected],J#|QN[/EMAIL]####@
  [EMAIL="[email protected],,[email protected]@Qa,,[email protected],[email protected]%,[email protected]"][email protected],,[email protected]@Qa,,[email protected],[email protected]%,[email protected][/EMAIL]  a,[email protected]%[email protected]@y,,[email protected],JaNNN####K
  JgOgOO0UUDDyymmm&&mmmmyqDD$  @gOggggBRRWWW%%QQQQMMNN#####t
   0gOOOO0UUDqqyymymmmmyqDUU0OOOOggggBRRRWWWW%QQQMMMNN####K
   [EMAIL="[email protected]%QQQMMMNNN###H"][email protected]%QQQMMMNNN###H[/EMAIL]=
     @[email protected]%%QQQMMMNN###H'
      [EMAIL="[email protected]%%QQMMMMNN###H"][email protected]%%QQMMMMNN###H[/EMAIL]=
       [EMAIL="[email protected]@mo;;==|[email protected]%%QQQMMMMMNN"][email protected]@mo;;==|[email protected]%%QQQMMMMMNN[/EMAIL]##!
         9gQdo;,=|[email protected]%%QQQMMMMMNN#@P
           [EMAIL="[email protected]@BRRRRRWWWWWW%%%QQQMMMMMNN"][email protected]@BRRRRRWWWWWW%%%QQQMMMMMNN[/EMAIL]##!=
             [EMAIL="[email protected]%%%%QQQQQMMMMMNN#9"][email protected]%%%%QQQQQMMMMMNN#9[/EMAIL]+
                ,[email protected]%%%Q%QQQQMQMMMMM##?^
                     [EMAIL="[email protected]@%[email protected]@#9"][email protected]@%[email protected]@#9[/EMAIL]?`
           _         ____       _  __       _       _____
          / \       / ___|  ___(_)/ _|_ __ (_) ___ / ___ \
         / _ \      \___ \ / _ \ | |_| '_ \| |/ __/ / __| \
        / ___ \      ___) |  __/ |  _| |_) | | (_| | (__   |
       /_/   \_\    |____/ \___|_|_| | .__/|_|\___\ \___| /
                                     |_|           \_____/
                       ____       __  __
                      / ___| __ _|  \/  | ___
                     | |  _ / _` | |\/| |/ _ \
                     | |_| | (_| | |  | |  __/
                      \____|\__,_|_|  |_|\___|
```
Just start by running the menu_2.bat

NOTE: dont change the names or the game won't function properly!!!


----------



## TheOutcaste (Aug 8, 2007)

No bugs to speak of, but some cleanup is needed.​ For example in the game.bat file, you have this repeated several times:

```
GOTO CHECKWIN
[COLOR=Red]CLS
GOTO VSpLAY[/COLOR]
```
The code in red will never be executed.
Some suggestions:
Using subroutines can help.
In the menu file, you have three different screens to display. The header is the same in all, and each selection is displayed twice with no box. Those sections only need to be written once, then called as a subroutine.

For the variables that represent the play positions, you should only store the piece info. This will simplify things greatly.
So instead of these values:

```
a1=____
a1=_x__
a1=_o__
```
Use these:

```
a1=_
a1=x
a1=o
```
Then for the display instead of this:

```
|  (%a1%)
```
use this

```
|  (_%a1%__)
```
This will also make it much easier to test for a win. There are 5 columns, 5 rows, and 4 diagonals that can have a win. You can combine them all into one string, then test for a win using findstr.
You can also use a variable to select the column variables, and a For loop for the rows, which let's you use one line to set the players piece in the selected column.
And instead of a separate file for playing the computer, just store the mode selection; then when it's player 2's turn, check the mode to determine what code to run.
Take a look through these two files. I've used some Extended Ascii characters for the menu selection box, not sure if they will copy and paste well from the forum. Also, if you want to get rid if the " on the left side, you can escape the special characters |, <, and > with a caret (^|, ^<, and ^>)
Menu:

```
@ECHO OFF
START CMD /C "@TITLE A SEIFPIC© GAME && COLOR 09 && @mode con cols=62 lines=40 && TYPE seifpic.txt && PING -n 6 0.0.0.0 >nul && EXIT" 

@mode con cols=74 lines=41
@TITLE ConN3Ct FO4 V 1.0
COLOR 48
:_Label5
:_Label7
Call :_Header
Echo."                 ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
Echo."             ___ ³       ____  _                   ³ ___
Echo."            / _ \³      |  _ \| | __ _ _   _       ³/ _ \
Echo."            ³³ ³³³      | |_) | |/ _` | | | |      ³³³ ³³ 
Echo."            ³³_³³³      |  __/| | (_| | |_| |      ³³³_³³
Echo."            \___/³      |_|   |_|\__,_|\__, |      ³\___/
Echo."                 ³                     |___/       ³
Echo."                 ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Call :_InstLine
Echo."
Call :_ExitLine
Echo."
Call :_Choose 0
GOTO _Label%_Resp%
:_Label1
:_Label8
Call :_Header
Call :_PlayLine
Echo."      ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
Echo."  ___ ³ ___           _                   _   _                 ³ ___
Echo." / _ \³|_ _|_ __  ___| |_ _ __ _   _  ___| |_(_) ___  _ __  ___ ³/ _ \
Echo." ³³ ³³³ | || '_ \/ __| __| '__| | | |/ __| __| |/ _ \| '_ \/ __|³³³ ³³
Echo." ³³_³³³ | || | | \__ \ |_| |  | |_| | (__| |_| | (_) | | | \__ \³³³_³³
Echo." \___/³|___|_| |_|___/\__|_|   \__,_|\___|\__|_|\___/|_| |_|___/³\___/
Echo."      ³                                                         ³
Echo."      ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Call :_ExitLine
Echo."
Call :_Choose 3
Goto _Label%_Resp%
:_Label2
:_Label4
Call :_Header
Call :_PlayLine
Call :_InstLine
Echo."                        ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
Echo."                    ___ ³ _____      _ _   ³ ___
Echo."                   / _ \³| ____|_  _(_) |_ ³/ _ \
Echo."                   ³³ ³³³|  _| \ \/ / | __|³³³ ³³
Echo."                   ³³_³³³| |___ >  <| | |_ ³³³_³³
Echo."                   \___/³|_____/_/\_\_|\__|³\___/
Echo."                        ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Call :_Choose 6
Goto _Label%_Resp%
:_Label6
CLS
Echo." Objective Of the game:
Echo."ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
Echo."    To win Connect Four you must be the first player 
Echo."to get four of your colored checkers in a row 
Echo."either horizontally, vertically or diagonally.
ECHO.
ECHO.
Echo."Controls:
Echo."ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
Echo."    First, there will be a prompt asking The game mode.
Echo."Choose The CoMpUtEr ( if you want to play Single  
Echo."player / versus the CPU) by pressing the '1' button 
Echo."either on the number pad or on the keyboard.
Echo."Choose Multiplayer (To play versus someone on the
Echo."same PC) by pressing the '1' button either on the
Echo."number pad or on the keyboard. Type the Nicknames
Echo."of your choice and press enter to confirm.
ECHO.
Echo."Controls (continued):
Echo."ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
Echo."When in The game itself, the table is drawn in ascii
Echo."graphics (text graphics). Choose the row to insert
Echo."your playing piece (either x or o) from a, b, c, d,
Echo."and e. The press the button that goes with it.
Echo."###################################################
Echo."press any key to go back to the menu...
PAUSE >nul
Goto _Label5
:_Label9
Call _Reset
Goto :EOF
:_Header
CLS
Echo."     ____            _   _ _____ _____     _      _____ ___  _  _
Echo."    / ___|___  _ __ | \ | |___ /| ____|___| |_   |  ___/ _ \| || |
Echo."   | |   / _ \| '_ \|  \| | |_ \|  _| / __| __|  | |_ | | | | || |_
Echo."   | |__| (_) | | | | |\  |___) | |__| (__| |_   |  _|| |_| |__   _|
Echo."    \____\___/|_| |_|_| \_|____/|_____\___|\__|  |_|   \___/   |_|
Echo."
Echo."                         __     __  _   ___
Echo."                         \ \   / / / | / _ \
Echo."                          \ \ / /  | || | | |
Echo."                           \ V /   | || |_| |
Echo."                            \_/    |_(_)___/
Echo."________________________________________________________________________
Echo."
Goto :EOF
:_PlayLine
Echo." 
Echo."                         ____  _
Echo."                        |  _ \| | __ _ _   _
Echo."                        | |_) | |/ _` | | | |
Echo."                        |  __/| | (_| | |_| |
Echo."                        |_|   |_|\__,_|\__, |
Echo."                                       |___/
Echo."
Goto :EOF
:_InstLine
Echo."
Echo."        ___           _                   _   _
Echo."       |_ _|_ __  ___| |_ _ __ _   _  ___| |_(_) ___  _ __  ___
Echo."        | || '_ \/ __| __| '__| | | |/ __| __| |/ _ \| '_ \/ __|
Echo."        | || | | \__ \ |_| |  | |_| | (__| |_| | (_) | | | \__ \
Echo."       |___|_| |_|___/\__|_|   \__,_|\___|\__|_|\___/|_| |_|___/
Echo."
Goto :EOF
:_ExitLine
Echo."                          _____      _ _
Echo."                         | ____|_  _(_) |_
Echo."                         |  _| \ \/ / | __|
Echo."                         | |___ >  <| | |_
Echo."                         |_____/_/\_\_|\__|
Goto :EOF
:_Label3
START gameto.bat
::EXIT
Goto :EOF
:_Choose
Echo."
Echo."Press the 's' and 'w' keys to switch between catagories and 'y' to 
Echo."confirm.
Choice /c swy /n >Nul
Set /A _Resp=%ErrorLevel%+%1
```
Game:

```
@Echo Off
SetLocal EnableDelayedExpansion
Mode Con Cols=74 Lines=35
Title CoN3Ct FO4 V 1.0
Set nickname1=Me
Set nickname2=You
Set _C=.abcde
Set _ColVal=9ACDF
Set /A _Num=%random% %% 5
Set _Color=!_ColVal:~%_Num%,1!
Color 0%_Color%

:VS
Echo Do You Want To Play Vs:
Echo 1) The CoMpUtEr
Echo 2) Multiplayer/ Yourself
Choice /c 12 /n >Nul
Cls
Set _Mode=%ErrorLevel%
Echo Player 1, Type Your Nickname, You will play as X's:
Set /p nickname1=
Echo.
If %_Mode%==1 (
  Set nickname2=CPU
) Else (
  Echo Type Player 2's Nickname, You will play as O's:
  Set /p nickname2=
)
Cls
For %%I In (a b c d e) Do For /L %%J In (1,1,5) Do Set %%I%%J=_
Set /A Turns=0
Set currentply=%nickname1%
:VSpLAY
Cls
Echo."Type where to insert your playing piece (A, B, C, D, E)
Echo." Turns:%Turns%
Echo." It's %currentply%'s Turn.
Echo."
Echo."        _______________________________________
Echo."       /___A______B______C______D______E_____ /|
Echo."      |  (_%a1%__) (_%b1%__) (_%c1%__) (_%d1%__) (_%e1%__)  |/|
Echo."      |    ||     ||     ||     ||     ||    |/|
Echo."      |  (_%a2%__) (_%b2%__) (_%c2%__) (_%d2%__) (_%e2%__)  |/|
Echo."      |    ||     ||     ||     ||     ||    |/|
Echo."      |  (_%a3%__) (_%b3%__) (_%c3%__) (_%d3%__) (_%e3%__)  |/|______________
Echo."      |    ||     ||     ||     ||     ||    |/|            / |
Echo."      |  (_%a4%__) (_%b4%__) (_%c4%__) (_%d4%__) (_%e4%__)  |/|_          /  |
Echo."      |    ||     ||     ||     ||     ||    |/|/|        /   |
Echo."      |  (_%a5%__) (_%b5%__) (_%c5%__) (_%d5%__) (_%e5%__)  |/|/        / /| |
Echo."     /|______________________________________|//        / / | |
Echo."    //______________________________________///        / /__|/
Echo."   / \______________________________________\/        / /
Echo."  /__________________________________________________/ /
Echo."  |   ____________________________________________   | |
Echo."  |  | |                                          |  | |
Echo."  |  | |                                          |  | |
Echo."  |__|/                                           |__|/
Echo."
Echo."*************************************************************************

If %currentply%==%nickname1% (Set _PlayPiece=x) Else Set _PlayPiece=o
If %_Mode%==1 PING -n 2 0.0.0.0 >Nul
:_PCPlay
If %_Mode%==1 (
  Set /A PCRAND=%RANDOM% %% 6
  Set _Col=!_C:~%PCRAND%,1!
) Else (
Choice /c abcde /n >Nul
  If ErrorLevel 6 Goto _Error
  If %ErrorLevel%==0 Goto VSpLAY
  Set _Col=!_C:~%ErrorLevel%,1!
)
For /L %%I In (5,-1,1) Do If !%_Col%%%I!==_ (Set %_Col%%%I=%_PlayPiece%)&Goto _CheckWin
If %_Mode%==1 Goto _PCPlay
Echo This Row is full please choose another one.
PING -n 3 0.0.0.0 >Nul
Goto VSpLAY

:_CheckWin
Set /A Turns+=1
If %currentply%==%nickname1% (Set currentply=%nickname2%) Else Set currentply=%nickname1%
Set _Test=%a1%%a2%%a3%%a4%%a5%A%b1%%b2%%b3%%b4%%b5%A%c1%%c2%%c3%%c4%%c5%A%d1%%d2%%d3%%d4%%d5%A%e1%%e2%%e3%%e4%%e5%A%a1%%b1%%c1%%d1%%e1%A%a2%%b2%%c2%%d2%%e2%A%a3%%b3%%c3%%d3%%e3%A%a4%%b4%%c4%%d4%%e4%A%a5%%b5%%c5%%d5%%e5%A%a1%%b2%%c3%%d4%%e5%A%b1%%c2%%d3%%e4%A%a2%%b3%%c4%%d5%A%e1%%d2%%c3%%b4%%a5%A%d1%%c2%%b3%%a4%A%e2%%d3%%c4%%b5%
Set _Wins=1
Echo %_Test%|Findstr "xxxx">Nul
If %ErrorLevel%==0 Goto _Winner
Set _Wins=2
Echo %_Test%|Findstr "oooo">Nul
If %ErrorLevel%==0 Goto _Winner
IF %Turns%==20 Goto Tie
Goto VSpLAY

:_Winner
If %_Wins%==1 (
Set _WinName1=%nickname1%
Set _WinName2=%nickname2%
) Else (
Set _WinName1=%nickname2%
Set _WinName2=%nickname1%
)
PING -n 3 0.0.0.0 >Nul
Cls
Call :_EndScreen
Echo."%_WinName1% is the:
Echo." _    _  ____  _  _  _  _  ____  ____ /\/\/\
Echo."( \/\/ )(_  _)( \( )( \( )( ___)(  _ \)()()(
Echo." )    (  _)(_  )  (  )  (  )__)  )   /\/\/\/
Echo."(__/\__)(____)(_)\_)(_)\_)(____)(_)\_)()()()
Echo."
Echo."Better luck next time, %_WinName2%!
Goto _PlayAgain
:Tie
PING -n 3 0.0.0.0 >Nul
Call :_EndScreen
Echo."
Echo."              ___  ____/ ___      __
Echo."             (_  _)(_  _)/ __)    /__\  ()
Echo."              _)(_   )(  \__ \   /(__)\
Echo."             (____) (__) (___/  (__)(__)()
Echo."              ____  ____  ____   _   _
Echo."             (_  _)(_  _)( ___) / \ / \
Echo."               )(   _)(_  )__) (   |   )
Echo."              (__) (____)(____) \_/ \_/
Echo."                                (_) (_)
Echo."
Echo."              Between %Nickname1% And %Nickname2%!!
:_PlayAgain
Echo."Press 'x' To Exit and 'm' To go back to the MainMenu.
COLOR 01
PING -n 2 0.0.0.0 >Nul
COLOR 02
PING -n 2 0.0.0.0 >Nul
COLOR 0c
PING -n 2 0.0.0.0 >Nul
COLOR 0d
PING -n 2 0.0.0.0 >Nul
Choice /c xm /n >Nul
IF "%ErrorLevel%"=="2" START menu_2.bat
EXIT
:_EndScreen
Echo."   ___  _____  _  _  _  _  ___   ___  ____    ____  _____  __
Echo."  / __)(  _  )( \( )( \( )(__ ) / __)(_  _)  ( ___)(  _  )/. |
Echo." ( (__  )(_)(  )  (  )  (  (_ \( (     )(     )__)  )(_)((_  _)
Echo."  \___)(_____)(_)\_)(_)\_)(___/ \___) (__)   (__)  (_____) (_)
Echo."
Echo."_____________________________________________________________________
```


----------



## seifpic (Jul 15, 2010)

Thanks TheOutCaste for reviewing the code. However, i am still a beginner in batch code. So i didnt understand all of the code. I dont really know what this line does:

```
For /L %%I In (5,-1,1) Do If !%_Col%%%I!==_ (Set %_Col%%%I=%_PlayPiece%)&Goto _CheckWin
```
And i'm not exactly sure what errorlevel does. But, I will have to put this game aside untill i finish my other game, frogger. So far so good.


----------



## TheOutcaste (Aug 8, 2007)

That line places the Play piece (x or o) in the first available row in the column the user chose.
This line 

```
Set _Col=!_C:~%ErrorLevel%,1!
```
Sets *_Col* to the letter they chose using the errorlevel returned by the Choose command to select the letter from the string stored in _C.
The *For /L* loop starts at 5, and decrements by one until it gets to 1, so %%I is set to 5, then 4, then 3, etc
So the If statement checks to see if that position is blank.
The variable expands like this if they choose B for instance:
!%_Col%%%I! becomes *!B5!*, then *!**B**4!*, etc, so that location is compared to the blank (_).
If it's blank, you set it to the current play piece (x or o) and go check if there is a win.
If all the spots in the column are used, the For loop ends and the next line is executed.
I do see one bug, if playing the computer it doesn't check to see which player is playing, so if the human chooses a full row, they will never see the message.
So this line:

```
If %_Mode%==1 Goto _PCPlay
```
Should be this:

```
If %_Mode%==1 If /I %_PlayPiece%==o Goto _PCPlay
```
See *If /?* for how to use the *If Errorlevel* statement.


----------

