loading
Here's a simple .bat game. It's not that good, but at least you'll have something to do when bored. :P
PS.: If you find any way to improve this code or any bugs/mistakes, please let me know by commenting down below.
Code:

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

@echo off

:Start1
cls
echo Let's play a game!
echo It's called NUMBER!
echo For settings, type "Sets"
echo Choose any number
echo between 1 and 10:
set /p choice1=
if %choice1%==Sets goto Settings
for /l %%G in (1,1,10) do if %choice1%==%%G goto Add
echo Choose between 1
echo and 10!!
ping localhost -n >nul 3
goto Start1

:Add
if %choice1%==10 goto Tie
set one=1
set /a result=%choice1%+%one%
echo.
echo I choose %result%!
echo I win!
ping localhost -n >nul 3
goto Again1

:Tie
echo.
echo I choose 10!
echo Tie!
ping localhost -n >nul 3
goto Again1

:Again1
cls
echo.
echo Wanna play again? (y/n)
set /p answer=
if %answer%==y goto Start1
if %answer%==n exit
echo Choose y or n!
ping localhost -n >nul 3
goto Again1

:Settings
cls
echo.
echo Settings menu
echo -=-=-=-=-=-=-
echo 1) Always winning
echo 2) Always losing
set /p input=
if %input%==1 goto Win
if %input%==2 goto Loss
echo Choose 1 or 2!
ping localhost -n >nul 3
goto Settings

:Loss
echo Set to always losing.
ping localhost -n >nul 3
goto Start1

:Win
echo Set to always wining.
ping localhost -n >nul 3
goto Start2

:Start2
cls
echo Let's play a game!
echo It's called NUMBER!
echo For settings, type "Sets"
echo Choose any number
echo between 1 and 10:
set /p choice2=
if %choice2%==Sets goto Settings
for /l %%G in (1,1,10) do if %choice2%==%%G goto Sub
echo Choose between 1
echo and 10!!
ping localhost -n >nul 3
goto Start2

:Sub
if %choice2%==1 goto Tie
set one=1
set /a result=%choice2%-%one%
echo.
echo I choose %result%!
echo You win!
ping localhost -n >nul 3
goto Again2

:Tie
echo.
echo I choose 1!
echo Tie!
ping localhost -n >nul 3
goto Again2

:Again2
cls
echo.
echo Wanna play again? (y/n)
set /p answer2=
if %answer2%==y goto Start2
if %answer2%==n exit
echo Choose y or n!
ping localhost -n >nul 3
goto Again2

:Again1
cls
echo.
echo Wanna play again? (y/n)
set /p answer=
if %answer%==y goto Start1
if %answer%==n exit
echo Choose y or n!
ping localhost -n >nul 3
goto Again1

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Well, some instructions would have been nice.... <br> <br>To be honest, this game isn't good at all. The scripting and readability of the code isn't great either. <br> <br>May I suggest a new game: <br> <br>You pick a number between 1 and whatever, and then the computer has to guess it. <br> <br>I would make it myself but I got the inspiration from your instructable, so it's your call. <br> <br>If you don't want to make it, let me know.
<p><a href="http://www.instructables.com/id/Simple-Batch-Game-1/" rel="nofollow">http://www.instructables.com/id/Simple-Batch-Game-1/</a></p><p>Here is something I did with this, I credited you and Tetheu98</p>
Well, I have just started with Batch and I'm not a pro (yet! :D), and this is my first &quot;mini-batch-based-game&quot;, so it's not that good.<br> But guessing the number would be very easy, because when you have a variable written by the user (for example: set /p &quot;input=&quot;), %input% becomes the value typed. For example, in the code above:<br> <br> echo Choose any number<br> echo between 1 and 10:<br> set /p choice1=<br> <br> If I typed 2, %choice1% would become 2. So guessing would be very easy, just by having &quot;echo %input%&quot;. Please explain with more details if I didn't understand it right. :P<br> P.S: I could also make a Step by Step if you want

About This Instructable

3,054views

6favorites

License:

More by Tetheu98:Simple batch game 
Add instructable to: