如何制作批处理游戏

[复制链接]
查看11 | 回复1 | 2009-7-31 01:16:12 | 显示全部楼层 |阅读模式
一般都要用for set 和setlocal enabledelayedexpansion列如:echo offmode con cols=40 lines=11set a=a1=①;a2=②;a3=③;a4=④;a5=;a0=;b=0;c=19set %a:;=&set %setlocal enabledelayedexpansion:aset /a b+=1set /a c+=1set d=0set g=0for /l %%a in (1,1,9) do (for /l %%b in (1,1,9) do (set /a b%%b%%a=!random!%%5)):bclstitle Dos 爆破砖块 !b!,!c!,!g!for /l %%a in (0,1,9) do (set /p=%%a nul&exitset e=set /p e= please chooseif "!e!" neq "" (call set f=%%b!e!%%if "!f!" neq "" set /a c-=1&set /a b!e!+=1&set d=0&set g=0)goto b:cset b!x!!y!=0set c1=0set c2=0set c3=0set c4=0set /a d+=1set /a g+=1for /l %%d in (!y!,1,9) do (call call set h=%%%%a%%b!x!%%d%%%%%%&if "!h!" neq "" if !c1!==0 set c1=%%d)for /l %%d in (!y!,-1,1) do (call call set h=%%%%a%%b!x!%%d%%%%%%&if "!h!" neq "" if !c2!==0 set c2=%%d)for /l %%d in (!x!,1,9) do (call call set h=%%%%a%%b%%d!y!%%%%%%&if "!h!" neq "" if !c3!==0 set c3=%%d)for /l %%d in (!x!,-1,1) do (call call set h=%%%%a%%b%%d!y!%%%%%%&if "!h!" neq "" if !c4!==0 set c4=%%d)if !c1! neq 0 set /a b!x!!c1!+=1 if !c2! neq 0 set /a b!x!!c2!+=1if !c3! neq 0 set /a b!c3!!y!+=1if !c4! neq 0 set /a b!c4!!y!+=1if !d!==3 set /a c+=1&set d=0for /l %%d in (1,1,9) do (for /l %%e in (1,1,9) do (for /l %%f in (1,1,5) do (if !b%%e%%d!==%%f goto b)))echo 您赢了 任意键继续&pause>nul&goto a
回复

使用道具 举报

千问 | 2009-7-31 01:16:12 | 显示全部楼层
批处理游戏...这个还真没想过...不知道...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行