প্রথমে নোটপেড টি চালু করুন তারপর নিচের লেখাটি কপি পেস্ট করুন।
@echo off
title Hangman
setlocal enabledelayedexpansion
:menu
cls
echo Main Menu
echo To Play A Game, Press 1
echo To Add new Words, Press 2
echo To exit, Press 3
set /p menu=
if not defined menu goto menu
if /i me;nu% equ 1 (
set menu=
goto Startgame
)
if /i me;nu% equ 2 (
set menu=
goto addwords
)
if /i me;nu% equ 3 (
set menu=
set finishing=1
goto :EOF
)
set menu=
goto menu
:addwords
cls
Echo Type the word you'd like to add to the dictionary and press enter.
set /p wordtoadd=""
if NOT defined wordtoadd (
goto addwords)
set justchecking=1
set wcheck=0
:wordadd
call :wwc;heck%
cls
if defined finishing (goto :EOF)
echo.>>Hangman.bat
echo :wwc;heck%>>Hangman.bat
echo set word=wo;rdtoadd%>>Hangman.bat
echo goto gotword>>Hangman.bat
set justchecking=
set wordtoadd=
set wcheck=
echo Word Added
pause>nul
goto menu
:goodcheck
set /a wcheck= wc;heck% + 1
goto wordadd
:startgame
cls
set hang=12
set /a randomnumber=ti;me:~9,2%
:numberadjustment
call :wra;ndomnumber%
if defined finishing (goto :EOF>nul)
cls
set /a randomnumber= ( ra;ndomnumber% * ( ( ra;ndomnumber% * 75 ) /100 ) ) / ( ra;ndomnumber% + 14 ) + ( ra;ndomnumber% * 4 ) / ( ra;ndomnumber% * 3 )
if /i randomnumber GEQ 10 (
set randomnumber=ra;ndomnumber:~0,2%
) ELSE (
set randomnumber=ra;ndomnumber:~0,1%
)
goto numberadjustment
:gotword
if defined justchecking (goto goodcheck)
set letternumber=0
:lettersorting
set x=!letternumber!
set Letterle;tternumber%=!word:~%x%,1!
set Spacele;tternumber%=_
if NOT "!Letterle;tternumber%!"=="" (
set /a letternumber= le;tternumber% + 1
goto lettersorting
)
set space=
set /a spacenumber=0
:spacecalculator
set space=sp;ace% #Spacesp;acenumber%#
set /a spacenumber= sp;acenumber% + 1
if /i sp;acenumber% equ le;tternumber% (goto 1guess) else (goto spacecalculator)
:1guess
set score=0
set allguesses=letters:
:guess
cls
goto hangha;ng%
:keepguessing
echo.
Echo Guess The Word: sp;ace:#=!%
if ha;ng%==1 ( echo Last Guess!) else (
echo Ha;ng% Guesses Left
)
echo You've guessed these
l;lguesses%
echo.
echo Guess Your Letter
set guess=
Set /p guess=
if not defined guess (goto guess)
set guess=gu;ess:~0,1%
if "gu;ess%"=="!" (goto guess)
echo You Guessed gu;ess%
if "
l;lguesses:~8%"=="" goto SkipCheckAlreadyGuess
echo
l;lguesses:~8% | find /i "gu;ess%" >nul
if /i r;rorlevel% equ 0 (
echo You've already guessed that.
pause>nul
goto guess
)
:SkipCheckAlreadyGuess
set allguesses=
l;lguesses% gu;ess%
set poonumber=le;tternumber%
if not defined score (set score=0)
if not defined oldscore (set oldscore=0)
:processguess
set verifyletter=!Letterpo;onumber%!
if /i "gu;ess%"=="ve;rifyletter%" (
set /a score= !score! + 1
goto letteradjust
)
goto resume
:letteradjust
set Spacepo;onumber%=!Letterpo;onumber%!
set !Letterpo;onumber%=LETTERDONE
:resume
set /a poonumber=po;onumber% - 1
if /i po;onumber% lss 0 (goto noletter)
goto processguess
:noletter
if /i sc;ore% GTR ol;dscore% (goto gotletter)
Echo Sorry, wrong.
set /a hang= !hang! - 1
if !hang!==0 (goto dead)
pause>nul
set /a oldscore= sc;ore%
cls
goto guess
:gotletter
echo Well done!
if le;tternumber%==sc;ore% (goto win)
pause>nul
set /a oldscore= sc;ore%
goto guess
:dead
cls
echo Sorry, you died.
echo The word was "wo;rd%".
pause>nul
goto endofall
:win
cls
echo You Won!
echo The word was "wo;rd%"!
echo Well done!
pause>nul
:endofall
set space=
set cheddar=
set word=
set oldscore=
set score=
set letternumber=
set poonumber=
set spacenumber=
set anotherword=
set randomnumber=
set hang=
set guess=
set verifyletter=
set x=0
:endset
if defined Letter%x% (
set Letter%x%=
set /a x= %x% + 1
goto endset
)
set x=0
:endset2
if defined Space%x% (
set Letter%x%=
set /a x= %x% + 1
goto endset2
)
set x=
:askagain
cls
echo Go to the menu (enter 1) or quit (enter 2)?
set /p cheddar=""
if not defined cheddar goto askagain
if h;eddar%==1 (
set cheddar=
goto menu)
if h;eddar%==2 (
set finishing=1
goto :EOF)
goto askagain
:hang12
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
goto keepguessing
:hang11
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo ________________________________
echo [________________________________]
goto keepguessing
:hang10
echo _
echo [ ]
echo [ ]
echo [ ]
echo [ ]
echo [ ]
echo [ ]
echo [ ]
echo [ ]
echo [ ]
echo [ ]
echo [ ]
echo [ ]
echo [ ]
echo [ ]
echo [ ]
echo [ ]
echo [_]_____________________________
echo [________________________________]
goto keepguessing
:hang9
echo ______________________________
echo [ ]_____________________________]
echo [ ]
echo [ ]
echo [ ]
echo [ ]
echo [ ]
echo [ ]
echo [ ]
echo [ ]
echo [ ]
echo [ ]
echo [ ]
echo [ ]
echo [ ]
echo [ ]
echo [ ]
echo [_]_____________________________
echo [________________________________]
goto keepguessing
:hang8
echo _____________________________
echo [ ]____________________________]
echo [ ] / /
echo [ ] / /
echo [ ] / /
echo [ ]/ /
echo [ ] /
echo [ ] /
echo [ ]/
echo [ ]
echo [ ]
echo [ ]
echo [ ]
echo [ ]
echo [ ]
echo [ ]
echo [ ]
echo [_]_____________________________
echo [________________________________]
goto keepguessing
:hang7
echo ______________________________
echo [ ]__________________(-)________]
echo [ ] / / (-)
echo [ ] / / (-)
echo [ ] / / (_)
echo [ ]/ /
echo [ ] /
echo [ ] /
echo [ ]/
echo [ ]
echo [ ]
echo [ ]
echo [ ]
echo [ ]
echo [ ]
echo [ ]
echo [ ]
echo [_]_____________________________
echo [________________________________]
goto keepguessing
:hang6
echo _____________________________
echo [ ]__________________(-)________]
echo [ ] / / (-)
echo [ ] / / (-)
echo [ ] / / _(_)_
echo [ ]/ / / *_*
echo [ ] / ] ___ [
echo [ ] / _____/
echo [ ]/
echo [ ]
echo [ ]
echo [ ]
echo [ ]
echo [ ]
echo [ ]
echo [ ]
echo [ ]
echo [_]_____________________________
echo [________________________________]
goto keepguessing
:hang5
echo _____________________________
echo [ ]__________________(-)________]
echo [ ] / / (-)
echo [ ] / / (-)
echo [ ] / / _(_)_
echo [ ]/ / / *_*
echo [ ] / ] ___ [
echo [ ] / _____/
echo [ ]/ [ ]
echo [ ] [ ]
echo [ ] [ ]
echo [ ] [_]
echo [ ]
echo [ ]
echo [ ]
echo [ ]
echo [ ]
echo [_]_____________________________
echo [________________________________]
goto keepguessing
:hang4
echo _____________________________
echo [ ]__________________(-)________]
echo [ ] / / (-)
echo [ ] / / (-)
echo [ ] / / _(_)_
echo [ ]/ / / *_*
echo [ ] / ] ___ [
echo [ ] / _____/
echo [ ]/ [ ]_______
echo [ ] [ ]_______]
echo [ ] [ ]
echo [ ] [_]
echo [ ]
echo [ ]
echo [ ]
echo [ ]
echo [ ]
echo [_]_____________________________
echo [________________________________]
goto keepguessing
:hang3
echo _____________________________
echo [ ]__________________(-)________]
echo [ ] / / (-)
echo [ ] / / (-)
echo [ ] / / _(_)_
echo [ ]/ / / *_*
echo [ ] / ] ___ [
echo [ ] / _____/
echo [ ]/ _______[ ]_______
echo [ ] [_______[ ]_______]
echo [ ] [ ]
echo [ ] [_]
echo [ ]
echo [ ]
echo [ ]
echo [ ]
echo [ ]
echo [_]_____________________________
echo [________________________________]
goto keepguessing
:hang2
echo _____________________________
echo [ ]__________________(-)________]
echo [ ] / / (-)
echo [ ] / / (-)
echo [ ] / / _(_)_
echo [ ]/ / / *_*
echo [ ] / ] ___ [
echo [ ] / _____/
echo [ ]/ _______[ ]_______
echo [ ] [_______[ ]_______]
echo [ ] [ ]
echo [ ] [ ]
echo [ ] / _
echo [ ] /__
echo [ ]
echo [ ] _
echo [ ]
echo [_]_____________________________
echo [________________________________]
goto keepguessing
:hang1
echo _____________________________
echo [ ]__________________(-)________]
echo [ ] / / (-)
echo [ ] / / (-)
echo [ ] / / _(_)_
echo [ ]/ / / *_*
echo [ ] / ] ___ [
echo [ ] / _____/
echo [ ]/ _______[ ]_______
echo [ ] [_______[ ]_______]
echo [ ] [ ]
echo [ ] [ ]
echo [ ] / _
echo [ ] / /
echo [ ] / /
echo [ ] /_/ _
echo [ ]
echo [_]_____________________________
echo [________________________________]
goto keepguessing
:w0
set word=Bugger
goto gotword
:w1
set word=Willy
goto gotword
:w2
set word=Jelly
goto gotword
:w3
set word=Nipple
goto gotword
:w4
set word=Poo
goto gotword
:w5
set word=Dog
goto gotword
:w6
set word=Rat
goto gotword
:w7
set word=Cat
goto gotword
:w8
set word=Orange
goto gotword
:w9
set word=Purple
goto gotword
:w10
set word=Curry
goto gotword
:w11
set word=Pickle
goto gotword
:w12
set word=Porridge
goto gotword
:w13
set word=Apple
goto gotword
:w14
set word=Loop
goto gotword
:w15
set word=Balloon
goto gotword
:w16
set word=Drive
goto gotword
:w17
set word=Pork
goto gotword
:w18
set word=Fornicate
goto gotword
:w19
set word=Fag
goto gotword
:w20
set word=Monkey
goto gotword
:w21
set word=Crispy
goto gotword
:w22
set word=Beef
goto gotword
:w23
set word=Constitutional
goto gotword
:w24
set word=Educational
goto gotword
:w25
set word=Abnormality
goto gotword
:w26
set word=Retarded
goto gotword
:w27
set word=Fornication
goto gotword
:w28
set word=Rubbing
goto gotword
:w29
set word=Resin
goto gotword
:w30
set word=French
goto gotword
:w31
set word=Pipeline
goto gotword
:w32
set word=Ripple
goto gotword
:w33
set word=Punk
goto gotword
:w34
set word=Turtle
goto gotword
:w35
set word=Antler
goto gotword
:w36
set word=Raindeer
goto gotword
:w37
set word=Document
goto gotword
:w38
set word=Hill
goto gotword
:w39
set word=Steak
goto gotword
:w40
set word=Stake
goto gotword
:w41
set word=Staple
goto gotword
:w42
set word=Hang
goto gotword
:w43
set word=Man
goto gotword
:w44
set word=Alcohol
goto gotword
:w45
set word=Nicotine
goto gotword
:w46
set word=Cigarette
goto gotword
:w47
set word=Triple
goto gotword
:w48
set word=Lime
goto gotword
:w49
set word=Wire
goto gotword
:w50
set word=Plaster
goto gotword
:w51
set word=Christmas
goto gotword
:w52
set word=Holiday
goto gotword
:w53
set word=Dynamite
goto gotword
:w54
set word=Lemming
goto gotword
:w55
set word=Pizza
goto gotword
:w56
set word=Suckle
goto gotword
:w57
set word=Trip
goto gotword
:w58
set word=Course
goto gotword
:w59
set word=Cruise
goto gotword
:w60
set word=Marquee
goto gotword
:w61
set word=Balance
goto gotword
:w62
set word=Scale
goto gotword
:w63
set word=Stuffing
goto gotword
:w64
set word=Storage
goto gotword
:w65
set word=Pot
goto gotword
:w66
set word=Tank
goto gotword
:w67
set word=Tassle
goto gotword
:w68
set word=Silenced
goto gotword
:w69
set word=Sniff
goto gotword
:w70
set word=Green
goto gotword
:w71
set word=Dolphin
goto gotword
:w72
set word=Echo
goto gotword
:w73
set word=Wheat
goto gotword
এবার লেখাটি সেইভ করুন Game.bat নামে
এবার সেভ করা ফাইল টি চালু করুন তারপর যা করতে বলে সেভাবে খেলুন
ভালো লাগলে জানাবেন।
সর্বশেষ এডিট : ১৭ ই ডিসেম্বর, ২০১২ রাত ১০:০০

অনুগ্রহ করে অপেক্ষা করুন। ছবি আটো ইন্সার্ট হবে।


