Descargar: http://smart.code-makers.net/BatchGames/BlockBreakerv1BySmartgenius.zip
Creo que este juego ya lo conocen, es un clasico en el cual mueven una plataforma con una pelota y el objetivo es hacerla rebotar y que vaya agarrando puntos o bloques, la imagen lo dice todo
He hecho dos versiones, una en Batch usando CHOICE.COM y el sistema de coordenadas, y el otro es el mismo juego pero agregando el comando COLOUS para que el juego salga a color y sin parpadeos de pantalla.
Manejan la tabla con las teclas A (Izquierda) D (Derecha) W (Lanzar / Acelerar pelota ) y con X salen del juego.
Codigo version normal:
Código:
@Echo off
@title BlockBreaker v 1
@mode con cols=28 lines=24
:: Batch Game - BlockBreaker v 1
:: Coded by SmartGenius
:: SmartGenius, Corp. 2010
If not exist "choice.com" (Goto :NoKey)
:Load
Call :Logo
Setlocal enabledelayedexpansion
Set /a "LimX=18","LimY=16","TBound=1","LBound=1"
Set /a "RBound=%LimX%-1"
Set /a "BBound=%LimY%-3"
Set NLevels=1
:Init
For /l %%a in (0,1,%LimX%) do (
For /l %%b in (0,1,%LimY%) do (
Set X%%aY%%b= ))
Set Ball=O
Set Bound=Û
Set Line=Û
Set Lost=ù
Set Point=*
:Levels
Set /a L+=1
Call :Level%L%
Call :Graphic
Set P%L%=%Movs%
If "%LOS%"=="True" Goto :Lost
If "%WIN%"=="True" Goto :Win
If "%NXL%"=="True" Goto :End
If "%L%"=="%NLevels%" Goto :Win
ping -n 1 0.0.0.0 >nul
Goto :Init
:Graphic
Call :Clear
Cls
For /l %%d in (0,1,%LimY%) do (
For /l %%e in (0,1,%LimX%) do (
Set Lin_%%d=!Lin_%%d!!X%%eY%%d!))
Echo.
Echo. BlockBreaker v 1 by Smart
Echo.
Echo. Lives:%Lives% Points:%Points%
Echo. ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
For /l %%f in (0,1,%LimY%) do (Echo. º!Lin_%%f!º)
Echo. ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
Call :%Action%
If "%Lives%"=="0" (Set LOS=True&Set NXL=True)
If "%Dots%"=="0" (Set WIN=True&Set NXL=True)
If "%NXL%"=="True" (Goto :Eof)
Goto :Graphic
:Paused
CHOICE /C:WADX /N >nul
If "%errorlevel%"=="1" (Set Action=Playing)
If "%errorlevel%"=="2" (call :LeftA)
If "%errorlevel%"=="3" (call :RightA)
If "%errorlevel%"=="4" (Set NXL=True)
Goto :Eof
:Playing
CHOICE /C:WADX /N /T:W,1 >nul
If "%errorlevel%"=="1" (Set Action=Playing)
If "%errorlevel%"=="2" (call :LeftB)
If "%errorlevel%"=="3" (call :RightB)
If "%errorlevel%"=="4" (Set NXL=True)
Call :MovBall
Goto :Eof
:RightA
If ["%Table%"]==["%MaxTable%"] (Goto :Eof)
For /f "tokens=1,5 delims=," %%u in ("%Table%") do (
call :MovAX+ "%%u" "%%v" TB "!%%u!"
call Set NewTable=!TB!,%Table%
For /f "tokens=1-5 delims=," %%t in ("!NewTable!") do (Set NewTable=%%t,%%u,%%v,%%w,%%x)
Set Table=!NewTable!
call :MovAX+ "%CurPos%" "%CurPos%" CurPos "!%CurPos%!"
)
Goto :Eof
:RightB
If ["%Table%"]==["%MaxTable%"] (Goto :Eof)
For /f "tokens=1,5 delims=," %%u in ("%Table%") do (
call :MovAX+ "%%u" "%%v" TB "!%%u!"
call Set NewTable=!TB!,%Table%
For /f "tokens=1-5 delims=," %%t in ("!NewTable!") do (Set NewTable=%%t,%%u,%%v,%%w,%%x)
Set Table=!NewTable!)
Goto :Eof
:LeftA
If ["%Table%"]==["%MinTable%"] (Goto :Eof)
For /f "tokens=1,5 delims=," %%u in ("%Table%") do (
call :MovAX- "%%v" "%%u" TB "!%%v!"
call Set NewTable=%Table%,!TB!
For /f "tokens=2-6 delims=," %%t in ("!NewTable!") do (Set NewTable=%%t,%%u,%%v,%%w,%%x)
Set Table=!NewTable!
call :MovAX- "%CurPos%" "%CurPos%" CurPos "!%CurPos%!"
)
Goto :Eof
:LeftB
If ["%Table%"]==["%MinTable%"] (Goto :Eof)
For /f "tokens=1,5 delims=," %%u in ("%Table%") do (
call :MovAX- "%%v" "%%u" TB "!%%v!"
call Set NewTable=%Table%,!TB!
For /f "tokens=2-6 delims=," %%t in ("!NewTable!") do (Set NewTable=%%t,%%u,%%v,%%w,%%x)
Set Table=!NewTable!)
Goto :Eof
:MovAX+
For /f "tokens=1,2 delims=X,Y" %%p in ("%~1") do (
Set /a MovX=%%p+1
call Set NMovX=%%X!MovX!Y%%q%%
If "!NMovX!"=="%Bound%" (Goto :Eof)
If "!NMovX!"==" " (
Set %~2=
Set X!MovX!Y%%q=%~4
Set %3=X!MovX!Y%%q))
Goto :Eof
:MovAX-
For /f "tokens=1,2 delims=X,Y" %%p in ("%~1") do (
Set /a MovX=%%p-1
call Set NMovX=%%X!MovX!Y%%q%%
If "!NMovX!"=="%Bound%" (Goto :Eof)
If "!NMovX!"==" " (
Set %~2=
Set X!MovX!Y%%q=%~4
Set %3=X!MovX!Y%%q))
Goto :Eof
:MovBall
Set EOM=False
Call :%NextMov% "%CurPos%"
If "%EOM%"=="True" Goto :Eof
Goto :MovBall
:Diag1
For /f "tokens=1,2 delims=X,Y" %%p in ("%~1") do (
Set /a MovX=%%p+1
Set /a MovY=%%q+1
call Set NMovX=%%X!MovX!Y%%q%%
call Set NMovY=%%X%%pY!MovY!%%
call Set NMovXY=%%X!MovX!Y!MovY!%%
If "!NMovXY!"=="%Bound%" (
If "%%q"=="%BBound%" (Set NextMov=Diag3)
If "%%p"=="%RBound%" (Set NextMov=Diag4)
Goto :Eof)
If "!NMovY!"=="%Point%" (
Set "X%%pY!MovY!= "
Set NextMov=Diag3
Set /a Points+=5
Set /a Dots-=1
Goto :Eof
)
If "!NMovX!"=="%Point%" (
Set "X!MovX!Y%%q= "
Set NextMov=Diag4
Set /a Points+=5
Set /a Dots-=1
Goto :Eof
)
If "!NMovXY!"=="%Point%" (
Set "X!MovX!Y!MovY!= "
Set NextMov=Diag2
Set /a Points+=5
Set /a Dots-=1
Goto :Eof
)
If "!NMovXY!"==" " (
Set %~1=
Set X!MovX!Y!MovY!=%Ball%
Set CurPos=X!MovX!Y!MovY!
Set EOM=True)
)
If "!NMovXY!"=="%Lost%" (
Set %~1=
Set /a Lives-=1
call :ReSet
Set EOM=True)
)
Goto :Eof
:Diag2
For /f "tokens=1,2 delims=X,Y" %%p in ("%~1") do (
Set /a MovX=%%p-1
Set /a MovY=%%q-1
call Set NMovX=%%X!MovX!Y%%q%%
call Set NMovY=%%X%%pY!MovY!%%
call Set NMovXY=%%X!MovX!Y!MovY!%%
If "!NMovXY!"=="%Bound%" (
If "%%q"=="%TBound%" (Set NextMov=Diag4)
If "%%p"=="%LBound%" (Set NextMov=Diag3)
Goto :Eof)
If "!NMovY!"=="%Point%" (
Set "X%%pY!MovY!= "
Set NextMov=Diag4
Set /a Points+=5
Set /a Dots-=1
Goto :Eof
)
If "!NMovX!"=="%Point%" (
Set "X!MovX!Y%%q= "
Set NextMov=Diag3
Set /a Points+=5
Set /a Dots-=1
Goto :Eof
)
If "!NMovXY!"=="%Point%" (
Set "X!MovX!Y!MovY!= "
Set NextMov=Diag1
Set /a Points+=5
Set /a Dots-=1
Goto :Eof
)
If "!NMovXY!"==" " (
Set %~1=
Set X!MovX!Y!MovY!=%Ball%
Set CurPos=X!MovX!Y!MovY!
Set EOM=True)
)
If "!NMovXY!"=="%Lost%" (
Set %~1=
Set /a Lives-=1
call :ReSet
Set EOM=True)
)
Goto :Eof
:Diag3
For /f "tokens=1,2 delims=X,Y" %%p in ("%~1") do (
Set /a MovX=%%p+1
Set /a MovY=%%q-1
call Set NMovX=%%X!MovX!Y%%q%%
call Set NMovY=%%X%%pY!MovY!%%
call Set NMovXY=%%X!MovX!Y!MovY!%%
If "!NMovXY!"=="%Bound%" (
If "%%q"=="%TBound%" (Set NextMov=Diag1)
If "%%p"=="%RBound%" (Set NextMov=Diag2)
Goto :Eof)
If "!NMovY!"=="%Point%" (
Set "X%%pY!MovY!= "
Set NextMov=Diag1
Set /a Points+=5
Set /a Dots-=1
Goto :Eof
)
If "!NMovX!"=="%Point%" (
Set "X!MovX!Y%%q= "
Set NextMov=Diag2
Set /a Points+=5
Set /a Dots-=1
Goto :Eof
)
If "!NMovXY!"=="%Point%" (
Set "X!MovX!Y!MovY!= "
Set NextMov=Diag4
Set /a Points+=5
Set /a Dots-=1
Goto :Eof
)
If "!NMovXY!"==" " (
Set %~1=
Set X!MovX!Y!MovY!=%Ball%
Set CurPos=X!MovX!Y!MovY!
Set EOM=True)
)
If "!NMovXY!"=="%Lost%" (
Set %~1=
Set /a Lives-=1
call :ReSet
Set EOM=True)
)
Goto :Eof
:Diag4
For /f "tokens=1,2 delims=X,Y" %%p in ("%~1") do (
Set /a MovX=%%p-1
Set /a MovY=%%q+1
call Set NMovX=%%X!MovX!Y%%q%%
call Set NMovY=%%X%%pY!MovY!%%
call Set NMovXY=%%X!MovX!Y!MovY!%%
If "!NMovXY!"=="%Bound%" (
If "%%q"=="%BBound%" (Set NextMov=Diag2)
If "%%p"=="%LBound%" (Set NextMov=Diag1)
Goto :Eof)
If "!NMovY!"=="%Point%" (
Set "X%%pY!MovY!= "
Set NextMov=Diag2
Set /a Points+=5
Set /a Dots-=1
Goto :Eof
)
If "!NMovX!"=="%Point%" (
Set "X!MovX!Y%%q= "
Set NextMov=Diag1
Set /a Points+=5
Set /a Dots-=1
Goto :Eof
)
If "!NMovXY!"=="%Point%" (
Set "X!MovX!Y!MovY!= "
Set NextMov=Diag3
Set /a Points+=5
Set /a Dots-=1
Goto :Eof
)
If "!NMovXY!"==" " (
Set %~1=
Set X!MovX!Y!MovY!=%Ball%
Set CurPos=X!MovX!Y!MovY!
Set EOM=True)
)
If "!NMovXY!"=="%Lost%" (
Set %~1=
Set /a Lives-=1
call :ReSet
Set EOM=True)
)
Goto :Eof
:Clear
For /l %%m in (0,1,%LimY%) do (Set Lin_%%m=)
Goto :Eof
:Reset
Set CurPos=X8Y13
Set Table=X10Y14,X9Y14,X8Y14,X7Y14,X6Y14
For /l %%h in (1,1,17) do (Set X%%hY14= )
For %%k in (%Init%) do (Set %%k=%Line%)
For /f "tokens=1 delims=," %%j in ("%Init%") do (Set %%j=%Ball%)
Set Action=Paused
Goto :Eof
:Lost
msg * Perdiste !
Goto :End
:Win
msg * Has Ganado !
Goto :End
:End
msg * Gracias por Jugar BlockBreaker v1 by SmartGenius
Endlocal
Exit
:Level1
Set /a "Movs=0","Points=0","Dots=36","Lives=3"
Set CurPos=X8Y13
Set Table=X10Y14,X9Y14,X8Y14,X7Y14,X6Y14
Set MaxTable=X17Y14,X16Y14,X15Y14,X14Y14,X13Y14
Set MinTable=X5Y14,X4Y14,X3Y14,X2Y14,X1Y14
Set Init=X8Y13,X6Y14,X7Y14,X8Y14,X9Y14,X10Y14
Set Dir=N
Set Action=Paused
Set NextMov=Diag3
For /l %%e in (%LBound%,1,%RBound%) do (Set X%%eY1= )
For /l %%f in (6,1,10) do (Set X%%fY2=%Bound%)
For %%k in (%Init%) do (Set %%k=%Line%)
For /f "tokens=1 delims=," %%j in ("%Init%") do (Set %%j=%Ball%)
For /l %%i in (0,1,%LimX%) do (
Set X0Y%%i=%Bound%
Set X%LimX%Y%%i=%Bound%
Set X%%iY0=%Bound%
Set X%%iY%LimY%=%Bound%)
For /l %%l in (2,1,16) do (Set X%%lY2=%Point%)
For /l %%m in (4,1,14) do (Set X%%mY3=%Point%)
For /l %%n in (6,1,12) do (Set X%%nY4=%Point%)
For /l %%o in (8,1,10) do (Set X%%oY5=%Point%)
For /l %%r in (1,1,17) do (Set X%%rY15=%Lost%)
Goto :Eof
:Logo
Cls
Color 0b
Echo.
Echo. °°°°°°°°°°°°°°°°°°°°°°°°°°
Echo. °°°°°°°°°°°°°°°°°°°°°°°°°°
Echo. °°°ÛÛÛ°°Û°°°ÛÛÛ°°ÛÛ°Û°°Û°°
Echo. °°°Û°°Û°Û°°°Û°Û°Û°°°Û°Û°°°
Echo. °°°ÛÛÛ°°Û°°°Û°Û°Û°°°ÛÛ°°°°
Echo. °°°Û°°Û°Û°°°Û°Û°Û°°°Û°Û°°°
Echo. °°°ÛÛÛ°°ÛÛÛ°ÛÛÛ°°ÛÛ°Û°°Û°°
Echo. °°°°°°°°°°°°°°°°°°°°°°°°°°
Echo. °°°°°°°°°°°°°°°°°°°°°°°°°°
Echo. °°°°°°B°R°E°A°K°E°R°°°°°°°
Echo. °°°°°°°°°°°°°°°°°°°°°°°°°°
Echo. °°°±°±°±°±°±°±°±°±°±°±°±°°
Echo. °°±°±°±°±°±°±°±°±°±°±°±°°°
Echo. °°°±°±°±°±°±°±°±°±°±°±°±°°
Echo. °°°°°°°°°°°°°°°°°°°°°°°°°°
Echo. °°°°°°°°°°°°°°°°°°°°°°°°°°
Echo. °°°°°°²°°°°°°°°°°°°°°°°°°°
Echo. °°°°ÛÛÛÛÛ°°°°°°°°°°°°°°°°°
Echo. °°°°°°°°°°°°°°°°°°°°°°°°°°
Echo. °°°°°: SmartGenius :°°°°°°
Echo. °°°°° Corp. 2010 °°°°°°
Echo. °°°°°°°°°°°°°°°°°°°°°°°°°°
ping -n 3 0.0.0.0 >nul
Goto :Eof
:NoKey
@mode con cols=30 lines=20
cls
Echo.
Echo Uno de los archivos necesarios para el
Echo funcionamiento de este Script no se
Echo encuentra.
Echo.
Echo CHOICE.COM
Echo.
Echo Por favor descargue una copia del Comando
Echo CHOICE de Internet...
Echo.
pause
exit
Y aqui el codigo de la version colorida del juego
Código:
@Echo off
@title BlockBreaker v 1
@mode con cols=28 lines=24
:: Batch Game - BlockBreaker v 1 Colored Version
:: Coded by SmartGenius
:: SmartGenius, Corp. 2010
If not exist "choice.com" (Goto :NoKey)
:Load
Call :Logo
Setlocal enabledelayedexpansion
Set /a "LimX=18","LimY=16","TBound=1","LBound=1"
Set /a "RBound=%LimX%-1"
Set /a "BBound=%LimY%-3"
Set NLevels=1
:Init
For /l %%a in (0,1,%LimX%) do (
For /l %%b in (0,1,%LimY%) do (
Set "X%%aY%%b=[0] "))
Set "Ball=[9]O"
Set "Bound=[5]$219"
Set "Line=[6]$219"
Set "Lost=[2]$176"
Set "Point=[12]*"
:Levels
Set /a L+=1
Call :Level%L%
Call :Graphic
Set P%L%=%Movs%
If "%LOS%"=="True" Goto :Lost
If "%WIN%"=="True" Goto :Win
If "%NXL%"=="True" Goto :End
If "%L%"=="%NLevels%" Goto :Win
ping -n 1 0.0.0.0 >nul
Goto :Init
:Graphic
Call :Clear
Cls
For /l %%d in (0,1,%LimY%) do (
For /l %%e in (0,1,%LimX%) do (
Set Lin_%%d=!Lin_%%d!!X%%eY%%d!))
Echo.
Echo. BlockBreaker v 1 by Smart
Echo.
Echo. Lives:%Lives% Points:%Points%
Echo. ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
For /l %%f in (0,1,%LimY%) do (Colous Writesec "[0] [11]$186!Lin_%%f![11]$186")
Echo. ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
Goto :%Action%
:Check
Colous 11 0 22,4 "%Points%"
If "%Lives%"=="0" (Goto :Lost)
If "%Dots%"=="0" (Goto :Win)
If "%NXL%"=="True" (Goto :End)
Goto :Eof
:Paused
CHOICE /C WADX /N >nul
If "%errorlevel%"=="1" (Set Action=Playing)
If "%errorlevel%"=="2" (call :LeftA)
If "%errorlevel%"=="3" (call :RightA)
If "%errorlevel%"=="4" (Set NXL=True)
Call :Check
Goto :%Action%
:Playing
CHOICE /C WADX /N /T:W,1 >nul
If "%errorlevel%"=="1" (Set Action=Playing)
If "%errorlevel%"=="2" (call :LeftB)
If "%errorlevel%"=="3" (call :RightB)
If "%errorlevel%"=="4" (Set NXL=True)
Call :MovBall
Call :Check
Goto :%Action%
:RightA
If ["%Table%"]==["%MaxTable%"] (Goto :Eof)
For /f "tokens=1,5 delims=," %%u in ("%Table%") do (
Call :MovAX+ "%%u" "%%v" TB "!%%u!"
Call Set NewTable=!TB!,%Table%
For /f "tokens=1-5 delims=," %%t in ("!NewTable!") do (Set NewTable=%%t,%%u,%%v,%%w,%%x)
Set Table=!NewTable!
Call :MovAX+ "%CurPos%" "%CurPos%" CurPos "!%CurPos%!"
)
Goto :Eof
:LeftA
If ["%Table%"]==["%MinTable%"] (Goto :Eof)
For /f "tokens=1,5 delims=," %%u in ("%Table%") do (
Call :MovAX- "%%v" "%%u" TB "!%%v!"
call Set NewTable=%Table%,!TB!
For /f "tokens=2-6 delims=," %%t in ("!NewTable!") do (Set NewTable=%%t,%%u,%%v,%%w,%%x)
Set Table=!NewTable!
Call :MovAX- "%CurPos%" "%CurPos%" CurPos "!%CurPos%!"
)
Goto :Eof
:RightB
If ["%Table%"]==["%MaxTable%"] (Goto :Eof)
For /f "tokens=1,5 delims=," %%u in ("%Table%") do (
call :MovAX+ "%%u" "%%v" TB "!%%u!"
call Set NewTable=!TB!,%Table%
For /f "tokens=1-5 delims=," %%t in ("!NewTable!") do (Set NewTable=%%t,%%u,%%v,%%w,%%x)
Set Table=!NewTable!)
Goto :Eof
:LeftB
If ["%Table%"]==["%MinTable%"] (Goto :Eof)
For /f "tokens=1,5 delims=," %%u in ("%Table%") do (
call :MovAX- "%%v" "%%u" TB "!%%v!"
call Set NewTable=%Table%,!TB!
For /f "tokens=2-6 delims=," %%t in ("!NewTable!") do (Set NewTable=%%t,%%u,%%v,%%w,%%x)
Set Table=!NewTable!)
Goto :Eof
:MovAX+
For /f "tokens=1,2 delims=X,Y" %%p in ("%~1") do (
Set /a MovX=%%p+1
call Set NMovX=%%X!MovX!Y%%q%%
If "!NMovX!"=="%Bound%" (Goto :Eof)
If "!NMovX!"=="[0] " (
Call :Color %2 "[0] "
Set "%~2=[0] "
Set X!MovX!Y%%q=%~4
Set %3=X!MovX!Y%%q
Call :Color !%3! "%%!%3!%%"
))
Goto :Eof
:MovAX-
For /f "tokens=1,2 delims=X,Y" %%p in ("%~1") do (
Set /a MovX=%%p-1
call Set NMovX=%%X!MovX!Y%%q%%
If "!NMovX!"=="%Bound%" (Goto :Eof)
If "!NMovX!"=="[0] " (
Call :Color %2 "[0] "
Set "%~2=[0] "
Set X!MovX!Y%%q=%~4
Set %3=X!MovX!Y%%q
Call :Color !%3! "%%!%3!%%"
))
Goto :Eof
:MovBall
Set EOM=False
Call :%NextMov% "%CurPos%"
If "%EOM%"=="True" Goto :Eof
Goto :MovBall
:Color
For /f "tokens=1,2 delims=X,Y" %%p in ("%~1") do (Set /a "ColX=%%p+5"&Set /a "ColY=%%q+6")
Set "Symbol=%~2"
rem Echo.%Symbol%
Colous %Symbol:~1,1% 0 %ColX%,%ColY% "%Symbol:~3%"
Colous Cursoroff
Goto :Eof
:Diag1
For /f "tokens=1,2 delims=X,Y" %%p in ("%~1") do (
Set /a MovX=%%p+1
Set /a MovY=%%q+1
call Set NMovX=%%X!MovX!Y%%q%%
call Set NMovY=%%X%%pY!MovY!%%
call Set NMovXY=%%X!MovX!Y!MovY!%%
If "!NMovXY!"=="%Bound%" (
If "%%q"=="%BBound%" (Set NextMov=Diag3)
If "%%p"=="%RBound%" (Set NextMov=Diag4)
Goto :Eof)
If "!NMovXY!"=="%Line%" (
If "%%q"=="%BBound%" (Set NextMov=Diag3)
If "%%p"=="%RBound%" (Set NextMov=Diag4)
Goto :Eof)
If "!NMovY!"=="%Point%" (
Set "X%%pY!MovY!=[0] "
Call :Color "X%%pY!MovY!" "[0] "
Set NextMov=Diag3
Set /a Points+=5
Set /a Dots-=1
Goto :Eof
)
If "!NMovX!"=="%Point%" (
Set "X!MovX!Y%%q=[0] "
Call :Color "X!MovX!Y%%q" "[0] "
Set NextMov=Diag4
Set /a Points+=5
Set /a Dots-=1
Goto :Eof
)
If "!NMovXY!"=="%Point%" (
Set "X!MovX!Y!MovY!=[0] "
Call :Color "X!MovX!Y!MovY!" "[0] "
Set NextMov=Diag2
Set /a Points+=5
Set /a Dots-=1
Goto :Eof
)
If "!NMovXY!"=="[0] " (
Call :Color "%~1" "[0] "
Set "%~1=[0] "
Set X!MovX!Y!MovY!=%Ball%
Set CurPos=X!MovX!Y!MovY!
Call :Color "!CurPos!" "%Ball%"
Set EOM=True)
)
If "!NMovXY!"=="%Lost%" (
Set "%~1=[0] "
Set /a Lives-=1
Goto :ReSet
)
)
Goto :Eof
:Diag2
For /f "tokens=1,2 delims=X,Y" %%p in ("%~1") do (
Set /a MovX=%%p-1
Set /a MovY=%%q-1
call Set NMovX=%%X!MovX!Y%%q%%
call Set NMovY=%%X%%pY!MovY!%%
call Set NMovXY=%%X!MovX!Y!MovY!%%
If "!NMovXY!"=="%Bound%" (
If "%%q"=="%TBound%" (Set NextMov=Diag4)
If "%%p"=="%LBound%" (Set NextMov=Diag3)
Goto :Eof)
If "!NMovXY!"=="%Line%" (
If "%%q"=="%TBound%" (Set NextMov=Diag4)
If "%%p"=="%LBound%" (Set NextMov=Diag3)
Goto :Eof)
If "!NMovY!"=="%Point%" (
Set "X%%pY!MovY!=[0] "
Call :Color "X%%pY!MovY!" "[0] "
Set NextMov=Diag4
Set /a Points+=5
Set /a Dots-=1
Goto :Eof
)
If "!NMovX!"=="%Point%" (
Set "X!MovX!Y%%q=[0] "
Call :Color "X!MovX!Y%%q" "[0] "
Set NextMov=Diag3
Set /a Points+=5
Set /a Dots-=1
Goto :Eof
)
If "!NMovXY!"=="%Point%" (
Set "X!MovX!Y!MovY!=[0] "
Call :Color "X!MovX!Y!MovY!" "[0] "
Set NextMov=Diag1
Set /a Points+=5
Set /a Dots-=1
Goto :Eof
)
If "!NMovXY!"=="[0] " (
Call :Color "%~1" "[0] "
Set "%~1=[0] "
Set X!MovX!Y!MovY!=%Ball%
Set CurPos=X!MovX!Y!MovY!
Call :Color "!CurPos!" "%Ball%"
Set EOM=True)
)
If "!NMovXY!"=="%Lost%" (
Set "%~1=[0] "
Set /a Lives-=1
Goto :ReSet
)
)
Goto :Eof
:Diag3
For /f "tokens=1,2 delims=X,Y" %%p in ("%~1") do (
Set /a MovX=%%p+1
Set /a MovY=%%q-1
call Set NMovX=%%X!MovX!Y%%q%%
call Set NMovY=%%X%%pY!MovY!%%
call Set NMovXY=%%X!MovX!Y!MovY!%%
If "!NMovXY!"=="%Bound%" (
If "%%q"=="%TBound%" (Set NextMov=Diag1)
If "%%p"=="%RBound%" (Set NextMov=Diag2)
Goto :Eof)
If "!NMovXY!"=="%Line%" (
If "%%q"=="%TBound%" (Set NextMov=Diag1)
If "%%p"=="%RBound%" (Set NextMov=Diag2)
Goto :Eof)
If "!NMovY!"=="%Point%" (
Set "X%%pY!MovY!=[0] "
Call :Color "X%%pY!MovY!" "[0] "
Set NextMov=Diag1
Set /a Points+=5
Set /a Dots-=1
Goto :Eof
)
If "!NMovX!"=="%Point%" (
Set "X!MovX!Y%%q=[0] "
Call :Color "X!MovX!Y%%q" "[0] "
Set NextMov=Diag2
Set /a Points+=5
Set /a Dots-=1
Goto :Eof
)
If "!NMovXY!"=="%Point%" (
Set "X!MovX!Y!MovY!=[0] "
Call :Color "X!MovX!Y!MovY!" "[0] "
Set NextMov=Diag4
Set /a Points+=5
Set /a Dots-=1
Goto :Eof
)
If "!NMovXY!"=="[0] " (
Call :Color "%~1" "[0] "
Set "%~1=[0] "
Set X!MovX!Y!MovY!=%Ball%
Set CurPos=X!MovX!Y!MovY!
Call :Color "!CurPos!" "%Ball%"
Set EOM=True)
)
If "!NMovXY!"=="%Lost%" (
Set "%~1=[0] "
Set /a Lives-=1
Goto :ReSet
)
)
Goto :Eof
:Diag4
For /f "tokens=1,2 delims=X,Y" %%p in ("%~1") do (
Set /a MovX=%%p-1
Set /a MovY=%%q+1
call Set NMovX=%%X!MovX!Y%%q%%
call Set NMovY=%%X%%pY!MovY!%%
call Set NMovXY=%%X!MovX!Y!MovY!%%
If "!NMovXY!"=="%Bound%" (
If "%%q"=="%BBound%" (Set NextMov=Diag2)
If "%%p"=="%LBound%" (Set NextMov=Diag1)
Goto :Eof)
If "!NMovXY!"=="%Line%" (
If "%%q"=="%BBound%" (Set NextMov=Diag2)
If "%%p"=="%LBound%" (Set NextMov=Diag1)
Goto :Eof)
If "!NMovY!"=="%Point%" (
Set "X%%pY!MovY!=[0] "
Call :Color "X%%pY!MovY!" "[0] "
Set NextMov=Diag2
Set /a Points+=5
Set /a Dots-=1
Goto :Eof
)
If "!NMovX!"=="%Point%" (
Set "X!MovX!Y%%q=[0] "
Call :Color "X!MovX!Y%%q" "[0] "
Set NextMov=Diag1
Set /a Points+=5
Set /a Dots-=1
Goto :Eof
)
If "!NMovXY!"=="%Point%" (
Set "X!MovX!Y!MovY!=[0] "
Call :Color "X!MovX!Y!MovY!" "[0] "
Set NextMov=Diag3
Set /a Points+=5
Set /a Dots-=1
Goto :Eof
)
If "!NMovXY!"=="[0] " (
Call :Color "%~1" "[0] "
Set "%~1=[0] "
Set X!MovX!Y!MovY!=%Ball%
Set CurPos=X!MovX!Y!MovY!
Call :Color "!CurPos!" "%Ball%"
Set EOM=True)
)
If "!NMovXY!"=="%Lost%" (
Set "%~1=[0] "
Set /a Lives-=1
Goto :ReSet
)
)
Goto :Eof
:Clear
For /l %%m in (0,1,%LimY%) do (Set Lin_%%m=)
Goto :Eof
:Reset
Set CurPos=X8Y13
Set Table=X10Y14,X9Y14,X8Y14,X7Y14,X6Y14
For /l %%h in (1,1,17) do (Set "X%%hY14=[0] ")
For %%k in (%Init%) do (Set %%k=%Line%)
For /f "tokens=1 delims=," %%j in ("%Init%") do (Set %%j=%Ball%)
Set Action=Paused
Call :Check
Goto :Graphic
:Lost
msg * Perdiste !
Goto :End
:Win
msg * Has Ganado !
Goto :End
:End
msg * Gracias por Jugar BlockBreaker v1 by SmartGenius
Endlocal
Exit
:Level1
Set /a "Movs=0","Points=0","Dots=36","Lives=3"
Set CurPos=X8Y13
Set Table=X10Y14,X9Y14,X8Y14,X7Y14,X6Y14
Set MaxTable=X17Y14,X16Y14,X15Y14,X14Y14,X13Y14
Set MinTable=X5Y14,X4Y14,X3Y14,X2Y14,X1Y14
Set Init=X8Y13,X6Y14,X7Y14,X8Y14,X9Y14,X10Y14
Set Dir=N
Set Action=Paused
Set NextMov=Diag3
For /l %%e in (%LBound%,1,%RBound%) do (Set "X%%eY1=[0] ")
For /l %%f in (6,1,10) do (Set "X%%fY2=%Bound%")
For %%k in (%Init%) do (Set "%%k=%Line%")
For /f "tokens=1 delims=," %%j in ("%Init%") do (Set "%%j=%Ball%")
For /l %%i in (0,1,%LimX%) do (
Set "X0Y%%i=%Bound%"
Set "X%LimX%Y%%i=%Bound%"
Set "X%%iY0=%Bound%"
Set "X%%iY%LimY%=%Bound%")
For /l %%l in (2,1,16) do (Set "X%%lY2=%Point%")
For /l %%m in (4,1,14) do (Set "X%%mY3=%Point%")
For /l %%n in (6,1,12) do (Set "X%%nY4=%Point%")
For /l %%o in (8,1,10) do (Set "X%%oY5=%Point%")
For /l %%r in (1,1,17) do (Set "X%%rY15=%Lost%")
Goto :Eof
:Logo
Cls
Color 0b
Echo.
Echo. °°°°°°°°°°°°°°°°°°°°°°°°°°
Echo. °°°°°°°°°°°°°°°°°°°°°°°°°°
Echo. °°°ÛÛÛ°°Û°°°ÛÛÛ°°ÛÛ°Û°°Û°°
Echo. °°°Û°°Û°Û°°°Û°Û°Û°°°Û°Û°°°
Echo. °°°ÛÛÛ°°Û°°°Û°Û°Û°°°ÛÛ°°°°
Echo. °°°Û°°Û°Û°°°Û°Û°Û°°°Û°Û°°°
Echo. °°°ÛÛÛ°°ÛÛÛ°ÛÛÛ°°ÛÛ°Û°°Û°°
Echo. °°°°°°°°°°°°°°°°°°°°°°°°°°
Echo. °°°°°°°°°°°°°°°°°°°°°°°°°°
Echo. °°°°°°B°R°E°A°K°E°R°°°°°°°
Echo. °°°°°°°°°°°°°°°°°°°°°°°°°°
Echo. °°°±°±°±°±°±°±°±°±°±°±°±°°
Echo. °°±°±°±°±°±°±°±°±°±°±°±°°°
Echo. °°°±°±°±°±°±°±°±°±°±°±°±°°
Echo. °°°°°°°°°°°°°°°°°°°°°°°°°°
Echo. °°°°°°°°°°°°°°°°°°°°°°°°°°
Echo. °°°°°°²°°°°°°°°°°°°°°°°°°°
Echo. °°°°ÛÛÛÛÛ°°°°°°°°°°°°°°°°°
Echo. °°°°°°°°°°°°°°°°°°°°°°°°°°
Echo. °°°°°: SmartGenius :°°°°°°
Echo. °°°°° Corp. 2010 °°°°°°
Echo. °°°°°°°°°°°°°°°°°°°°°°°°°°
Ping -n 3 0.0.0.0 >nul
Goto :Eof
:NoKey
Mode con cols=30 lines=20
Cls
Echo.
Echo Uno de los archivos necesarios para el
Echo funcionamiento de este Script no se
Echo encuentra.
Echo.
Echo CHOICE.COM
Echo.
Echo Por favor descargue una copia del Comando
Echo CHOICE de Internet...
Echo.
Pause
Exit
Espero que les guste, y cualquier comentario o sugerencia es bien recibido !
Saludis.