DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Code Of A Game

02.24.2008
| 10477 views |
  • submit to reddit
        This Is A Code Of A Game.

Coppy It Into Notepad And Then Save It As Game.bat

Warning!
Make Sure It Says "All Files (*.*)" And Not "Text Document (.txt)" At The Bottom.
The Code Is:
@echo off
goto verybegingame
: verybegingame
echo Welcome To This Game!
title Game Start
echo Press Any Key For Stuff.
pause >nul
echo Loading...
ping localhost 6 >nul
echo.. Loading Comple!
pause >nul
cls
echo Rules:
title Game Rules
echo..You Answer Each Question.
echo. If It Is Correct, You Will Move On.
echo If It is InCorrect, The Program Will
echo Exit And You Will Need To Try Again.
echo.. If You Get All The Questions Right, You
echo Will Receave A Speical Code.
echo Enter THe Code For A Suprse!
echo...
echo Good Luck!
echo.....
echo Press A Key Of An Option, And Then 
echo Press 'Enter'.
echo...
echo                        1 = Play Game          2 = Enter Code
SET /P "onechoose1=Enter 1 or 2 option here:"
If %onechoose1%= 1 then goto playgame
If %onechoose1%= 2 then goto entercode
:playgame
cls
echo What Is My Name?
echo A.Jonathan
echo B.Sam
echo C.Johnn
SET /p "q1=Enter Option:"
If NOT%q1%= A then exit
:entercode
echo  Enter Code
SET /P "codeenter= "
If %entercode%=code... goto prize
:prize


All Of ThAT...
MAKE MORE QUESTIONS.
etc.