本帖最后由 netbenton 于 2021-12-27 15:40 编辑
增加了背景虚块!!无可挑剔了。。。- @echo off
- title 批处理俄罗斯方块
- ::win10测试运行。由netbenton编写,bathome首发,更新于:2021年12月24日
- MODE CON: COLS=40 LINES=24
- (FOR /F "TOKENS=1 DELIMS==" %%A IN ('SET') DO SET %%A=
- path %path%
- )
-
- set a=ga1=0 1 5 6;ga2=1 4 5 8;gb1=1 2 4 5;gb2=0 4 5 9;za1=4 5 6 7;za2=1 5 9 d;qa1=1 5 9 8;qa2=0 4 5 6;qa3=2 1 5 9;qa4=4 5 6 a;qb1=1 5 9 a;qb2=2 4 5 6;qb3=0 1 5 9;qb4=4 5 6 8;ta1=5 6 9 a;ta2=5 6 9 a;sa1=1 4 5 6;sa2=1 4 5 9;sa3=4 5 6 9;sa4=1 5 6 9;tw1=5 9;tw2=5 6;on1=9;on2=9;sh1=1 4 5 6 9;sh2=1 4 5 6 9;ao1=0 1 2 4 6;ao2=0 1 4 8 9;ao3=0 4 5 6 2;ao4=0 1 5 8 9;tt1=0 1 2 5 9;tt2=0 4 8 5 6;tt3=1 5 8 9 a;tt4=2 4 5 6 a;k3=k%%=mx,k+;k4=down;k1=y-;k2=y+;k5=暂停;k0=其它键;z=setlocal enabledelayedexpansion;a=!
- set %a:;=&set %
-
- if not exist mk.exe (
- echo;缺少扩展键盘输入的三方【mk.exe】
- pause&goto :eof
- )
-
- for /F "tokens=1 delims=#" %%a in ('"prompt #$E# & echo on & for %%b in (1) do rem"') do set "v=%%a"
- echo;%v%[?25l
-
- for %%a in (1037 1039 13232 1040 11313 12727) do set /a n+=1,k%%a=n
- mk.exe /g
- set/a odt=tt/1000,gmk=0,key1=0,l1=40,l2=120,l3=370,l4=1200,tt=%errorlevel%
-
- %z%
-
- set zmenu=%v%[37m%v%[10;26H 【!a!玩法!a!】%v%[12;26H 第!a!guan!a!关%v%[14;26H 消行:!a!fen!a!%v%[16;26H 【得分】%v%[17;26H !a!fens!a!
-
- call :制表 23 22 zb
-
- set s=a
- for %%a in (b c d e f) do set %%a=!a!!s!!a!&set s=%%a
-
- for /l %%b in (0,1,9) do (
- set gLineText=!gLineText!!b!f!a!d@.%%b!a!!b!
-
- set gLineEcho=!gLineEcho!!c!c!b!d!a!e@!a!.%%b!b!!c!
-
- set pLineTo_0=!pLineTo_0!d@.%%b=0,
-
- )
-
- set pLineTo_0=!pLineTo_0:~,-1!
-
- for /l %%a in (0,1,19) do (
- set e%%a=%%a&set rs=!rs! %%a
- for /f "tokens=*" %%b in ("!pLineTo_0:@=%%a!") do set/a %%b
- set ech=!ech!%v%[B%v%[20D!gLineEcho:@=%%a!
- )
-
- set "rs=!rs! "
-
-
- set n=0
- for /l %%a in (30,1,37) do (
- set c!n!=!v |