|
sl543001
中级用户
  
积分 499
发帖 225
注册 2008-12-30
状态 离线
|
『第 16 楼』:
使用 LLM 解释/回答一下
新版的sybc 1.1.21已经支持了choice功能
新版斗地主同步支持sybc进行方向键控制
最新截图已在1楼更新
The new version of sybc 1.1.21 has supported the choice function. The new version of Dou Di Zhu (Landlord) synchronously supports using sybc for direction key control. The latest screenshots have been updated on the first floor.
|

SYBNQQ:354324773
|
|
2010-3-6 16:34 |
|
|
baohusan
新手上路

积分 19
发帖 10
注册 2010-3-3
状态 离线
|
『第 17 楼』:
使用 LLM 解释/回答一下
不错 呵呵
成功了一定看看
Not bad, heh heh.
If it succeeds, I must take a look.
|
|
2010-3-7 09:43 |
|
|
chenall
银牌会员
    
积分 1276
发帖 469
注册 2002-12-23 来自 福建泉州
状态 离线
|
|
2010-3-7 21:26 |
|
|
sl543001
中级用户
  
积分 499
发帖 225
注册 2008-12-30
状态 离线
|
『第 19 楼』:
使用 LLM 解释/回答一下
目前只有前台界面,根本不能出牌滴!
不过如果需要目前的版本,拿去研究的话,
加群:3401238找我要!
Currently there is only a front - end interface, and it can't play cards at all!
But if you need the current version for research,
Join the group: 3401238 and ask me for it!
|

SYBNQQ:354324773
|
|
2010-3-8 11:07 |
|
|
BWSkyer
中级用户
   我是DOS学者
积分 367
发帖 180
注册 2006-5-14 来自 重庆
状态 离线
|
|
2010-3-8 11:42 |
|
|
sl543001
中级用户
  
积分 499
发帖 225
注册 2008-12-30
状态 离线
|
『第 21 楼』:
使用 LLM 解释/回答一下
正在编写出牌的前台代码,目前不验证是否违规,电脑暂时不会出牌!
I'm currently writing the front-end code for playing cards, and it doesn't verify if it's against the rules at the moment, and the computer won't play cards for the time being!
|

SYBNQQ:354324773
|
|
2010-3-10 13:35 |
|
|
sl543001
中级用户
  
积分 499
发帖 225
注册 2008-12-30
状态 离线
|
『第 22 楼』:
使用 LLM 解释/回答一下
嵌入了牌型检测,玩家出牌时会得到提示:
如果出牌符合规则,则提示所处的牌.[例如截图中提示3张7带1对4]
如果出牌不符合规则,则提示违规!
Embedded card pattern detection, when a player plays a card, they will get a prompt:
If the card play conforms to the rules, it will prompt the card set it is in.
If the card play does not conform to the rules, it will prompt "illegal!"
附件
1: ddz59.GIF (2010-3-13 20:44, 19.1 KiB)
|

SYBNQQ:354324773
|
|
2010-3-13 20:44 |
|
|
HAT
版主
       
积分 9023
发帖 5017
注册 2007-5-31
状态 离线
|
『第 23 楼』:
使用 LLM 解释/回答一下
厘秒和秒之间的换算关系是怎样的?
What is the conversion relationship between centiseconds and seconds?
|

 |
|
2010-3-14 12:34 |
|
|
sl543001
中级用户
  
积分 499
发帖 225
注册 2008-12-30
状态 离线
|
|
2010-3-14 17:48 |
|
|
sl543001
中级用户
  
积分 499
发帖 225
注册 2008-12-30
状态 离线
|
   『第 25 楼』:
发布斗地主无AI测试版
使用 LLM 解释/回答一下
非正式发布斗地主无AI测试版
目前勉强可以拿出来看看,但还有很多需要完善和修改.
如有任何意见建议欢迎回帖或加QQ群:3401238
@echo off&SETLOCAL ENABLEDELAYEDEXPANSION&(CHCP 437 &GRAFTABL 936)>NUL
set a=s1=A;s2=2;s3=3;s4=4;s5=5;s6=6;s7=7;s8=8;s9=9;s10=0;s11=J;s12=Q;s13=K;s14=A;s15=2;s16=N;s17=N;h1=;h2=;h3=;h4=;h0=T;y0=c;y1=0;p=1
set pk%a:;=&set pk%
SET SYBCOM=A100;80BE AC00 23C 5472 3CAC 7501 BE13 282;0EEB 3CAC 743A 3C09 740D 8347 1EE 46EB;E8AC 90 A2E8 3C00 7F18 8837 E8C6 84;96E8 3C00 7F4F 882B B0C2 F602 50E2 A0B0;E6F6 15F 57C7 3CAC 7424 E80A 67 45E8;8800 EBD1 E817 3B D188 10EB B0 16CD;E088 4CB4 21CD 815F A0C7 5700 B850 B800;0750 295A 88F5 ACCA 243C D974 3B3C 9274;0D3C DE74 233C 575 D783 EB01 AA01 D088;EBAA E8E4 1E C387 393C 27E 904 FB80;7E39 8003 9C3 F24 E380 B20F F610 E2;88D8 C3C2 3CAC 7420 3CFB 740D 88A5 ACC3;203C F074 D3C 9A74 87C3 2CC3 8030 30EB;0AB4 E4F6 D800 C3
SET V=;RCX;D7;N SYBC.COM;W;Q
if not exist sybc.com (ECHO.%SYBCOM:;=&ECHO.DW %&ECHO.%V:;=&ECHO.%)|DEBUG>NUL
set DEBUGQK=1F8 267;298 307;338 3a7;3D8 447;478 4e7;518 587;5B8 627;658 6c7;6F8 767;798 807;838 8a7;8D8 947;978 9e7;A18 a87;AB8 b27
set pkBK=$7f
set pkBK2=$f7
set pkBK3=$37
set pkBK4=$73
set pkNB=$f1
color 3e
echo 斗地主 测试版
echo.
echo 目前没有AI,电脑不会出牌.你可以随便出牌,出完自动发牌.
echo.
echo 目前可用按键及其功能:
echo F2 从新发牌 F5 刷新
echo 方向键 控制扑克 空格 出牌
echo.
echo 按任意键开始...
sybc
:win
:2
for /l %%b in (3,1,11) do set /a pr=!random!%%4+1&&for /f %%a in ("!pr!") do set pbh%%b=!pkh%%a!&&set pby%%b=!pky0!&&if %%a gtr 2 set pby%%b=!pky1!
for /l %%b in (4,1,12) do set /a pr=!random!%%4+1&&for /f %%a in ("!pr!") do set pch%%b=!pkh%%a!&&set pcy%%b=!pky0!&&if %%a gtr 2 set pcy%%b=!pky1!
call :FP
:1
set titds=$f
cls
set t1=%time%
sybc 10000%TITDS%0 :::│%TITDS%c积%TITDS%9 电脑左 %TITDS%00 %TITDS%2+0%TITDS%c=%TITDS%00 %TITDS%0│%TITDS%c 斗地主 V0.0 %TITDS%0│%TITDS%0 %TITDS%0│ 底 牌 │:::
sybc 10100%TITDS%0 ::│%TITDS%c分%TITDS%9 电脑右 %TITDS%00 %TITDS%2+0%TITDS%c=%TITDS%00 %TITDS%0│%TITDS%9 开发者:SYBN netbenton %TITDS%0│%TITDS%9 电脑左 %TITDS%0│ │::
sybc 10200%TITDS%0 :│%TITDS%c榜%TITDS%9 玩家SYBN %TITDS%00 %TITDS%2+0%TITDS%c=%TITDS%00 %TITDS%0│%TITDS%22010-3-13 按F1查看帮助%TITDS%0│%TITDS%d 叫分 3分 %TITDS%0│ │:
sybc 10168%TITDS%%pdi1y%%pdi1s% %TITDS%%pdi2y%%pdi2s% %TITDS%%pdi3y%%pdi3s%;%TITDS%%pdi1y%%pdi1h% %TITDS%%pdi2y%%pdi2h% %TITDS%%pdi3y%%pdi3h%
call :pb 10701
call :pb 10769
sybc 10300$4c☉$4c▄▄▄▄$4c☉;$c4▌$c9 电脑左 $4c▌;$c4▌$ce余牌11张$4c▌;$4c☉$c4▄▄▄▄$4c☉
sybc 10368$4c☉$4c▄▄▄▄$4c☉;$c4▌$c9 电脑右 $4c▌;$c4▌$ce余牌7 张$4c▌;$4c☉$c4▄▄▄▄$4c☉
sybc 11400$4c☉$4c▄▄▄▄$4c☉;$c4▌$c9玩家SYBN$4c▌;$c4▌$ce余牌17张$4c▌;$4c☉$c4▄▄▄▄$4c☉
call :p11
:for /l %%a in (3,1,11) do set /a wz=10352+%%a*3-9*3&&call :pa !wz! !pby%%a! !pks%%a! !pbh%%a! 农 民
:for /l %%a in (4,1,12) do set /a wz=10800+%%a*3&&call :pa !wz! !pcy%%a! !pks%%a! !pch%%a! 地 主
set t2=%time%
call :timec
:GB
::title 请选择您要出的牌...
set /a GBy=12212,GBs=1
:GB1
set /a GBW=12209+GBs*3
sybc %GBy%f1 ;:%GBw%f1↑
sybc
title sybc-%errorlevel%-
if %errorlevel% == 75 set /a GBs-=1
if %errorlevel% == 77 set /a GBs+=1
if %errorlevel% == 72 set /a p2w%GBs%=1&&call :p11 1 %GBs%
if %errorlevel% == 80 set /a p2w%GBs%=0&&call :p11 0 %GBs%
if %errorlevel% == 57 goto chupai
if %errorlevel% == 60 goto 2
if %errorlevel% == 63 goto 1
if %GBs% lss 1 set gbs=%p2z%
if %GBs% gtr %p2z% set gbs=1
set /a GBy=GBw
goto :GB1
:chupai
set /a p6s=0,p6h=0,p6y=0,p6z=0,p0s=0,p0h=0,p0y=0,p0z=0,p2zBF=%p2z%
set p2sBF=%p2s%
set p2hBF=%p2h%
set p2yBF=%p2y%
for /l %%a in (1,1,%p2z%) do if !p2w%%a! == 1 (set /a p6z=p6z+1&&set p6s=!p6s!!p2s:~%%a,1!&&set p6h=!p6h!!p2h:~%%a,1!&&set p6y=!p6y!!p2y:~%%a,1!&&set p6js=农 民) else (set /a p0z=p0z+1&&set p0s=!p0s!!p2s:~%%a,1!&&set p0h=!p0h!!p2h:~%%a,1!&&set p0y=!p0y!!p2y:~%%a,1!)
for /l %%a in (1,1,%p0z%) do (set /a p2z=p0z&&set p2s=!p0s!&&set p2h=!p0h!&&set p2y=!p0y!)
:yanzheng
set px=违规
set p6yx=0
::标记字符串对应的牌
set ps=---34567890JQKA02N$
::初始化
for /l %%a in (0,1,4) do set pss%%a=0
for %%a in (3 4 5 6 7 8 9 0 J Q K A 2 N) do set ps%%a=0&set p6zs%%a=0
::计算各中点数的牌的数量
for /l %%a in (1,1,20) do for /f %%b in ("!p6s:~%%a,1!") do set /a ps%%b+=1
::计算牌的数量
set /a p6zs=%ps3%+%ps4%+%ps5%+%ps6%+%ps7%+%ps8%+%ps9%+%ps0%+%psj%+%psq%+%psk%+%psa%+%ps2%+%psn%
::获取标记字符串%p6ss%
set p6ss=---%ps3%%ps4%%ps5%%ps6%%ps7%%ps8%%ps9%%ps0%%psj%%psq%%psk%%psa%0%ps2%%psn%$
::提取最大的单张,2张,3张,4张
for /l %%a in (3,1,17) do set pss!p6ss:~%%a,1!=%%a
::单牌
if %p6zs% == 1 set px=一张!ps:~%pss1%,1!&set p6yx=%pss1%
::3张和飞机
::解释: %p6ss:3=.% == %p6ss% 表示%p6ss%中没有3则if生效,加上not表示有3则if生效
if %p6zs% == 3 if not %p6ss:3=.% == %p6ss% set px=三张!ps:~%pss3%,1!
if %p6zs% == 4 if not %p6ss:3=.% == %p6ss% set px=三张!ps:~%pss3%,1!带一张!ps:~%pss1%,1!
if %p6zs% == 5 if not %p6ss:3=.% == %p6ss% if not %p6ss:2=.% == %p6ss% set px=三张!ps:~%pss3%,1!带一对!ps:~%pss2%,1!
if %p6zs% == 6 if not %p6ss:33=.% == %p6ss% set px=飞机
if %p6zs% == 8 if not %p6ss:33=.% == %p6ss% set px=飞机带单
if %p6zs% == 10 if not %p6ss:33=.% == %p6ss% if %p6ss:1=.% == %p6ss% set px=飞机带对
if %p6zs% == 9 if not %p6ss:333=.% == %p6ss% set px=三顺
if %p6zs% == 12 if not %p6ss:333=.% == %p6ss% set px=三顺带单
if %p6zs% == 15 if not %p6ss:333=.% == %p6ss% if %p6ss:1=.% == %p6ss% set px=三顺带对
if %p6zs% == 12 if not %p6ss:3333=.% == %p6ss% set px=三大顺
if %p6zs% == 16 if not %p6ss:3333=.% == %p6ss% set px=三大顺带单
::为防止出现类似333444555666777qqqkkkaa被误认为三大顺带对加入下面一行
set p6ss3=%p6ss:3333=.%
if %p6zs% == 20 if not %p6ss:3333=.% == %p6ss% if %p6ss:1=.% == %p6ss% if %p6ss3:3=.% == %p6ss3% set px=三大顺带对
if %p6zs% == 15 if not %p6ss:33333=.% == %p6ss% set px=三巨顺
if %p6zs% == 20 if not %p6ss:33333=.% == %p6ss% set px=三巨顺带单
if %p6zs% == 18 if not %p6ss:333333=.% == %p6ss% set px=三神顺
::对子和兄弟
if %p6zs% == 2 if %p6ss:1=.% == %p6ss% set px=一对!ps:~%pss2%,1!&set p6yx=%pss2%
if %p6zs% == 6 if not %p6ss:222=.% == %p6ss% set px=3兄弟
if %p6zs% == 8 if not %p6ss:2222=.% == %p6ss% set px=4兄弟
if %p6zs% == 10 if not %p6ss:22222=.% == %p6ss% set px=5兄弟
if %p6zs% == 12 if not %p6ss:222222=.% == %p6ss% set px=6兄弟
if %p6zs% == 14 if not %p6ss:2222222=.% == %p6ss% set px=7兄弟
if %p6zs% == 16 if not %p6ss:22222222=.% == %p6ss% set px=8兄弟
if %p6zs% == 18 if not %p6ss:222222222=.% == %p6ss% set px=9兄弟
if %p6zs% == 20 if not %p6ss:2222222222=.% == %p6ss% set px=10兄弟
::顺子
if %p6zs% == 5 if not %p6ss:11111=.% == %p6ss% set px=5张顺子
if %p6zs% == 6 if not %p6ss:111111=.% == %p6ss% set px=6张顺子
if %p6zs% == 7 if not %p6ss:1111111=.% == %p6ss% set px=7张顺子
if %p6zs% == 8 if not %p6ss:11111111=.% == %p6ss% set px=8张顺子
if %p6zs% == 9 if not %p6ss:111111111=.% == %p6ss% set px=9张顺子
if %p6zs% == 10 if not %p6ss:1111111111=.% == %p6ss% set px=10张顺子
if %p6zs% == 11 if not %p6ss:11111111111=.% == %p6ss% set px=11张顺子
if %p6zs% == 12 if not %p6ss:111111111111=.% == %p6ss% set px=12张顺子
::炸弹
if %p6zs% == 4 if not %p6ss:4=.% == %p6ss% set px=4炸!ps:~%pss4%,1!&set p6yx=%pss4%
if %p6zs% == 2 if not %p6ss:2$=.% == %p6ss% set px=王炸&set p6yx=%pss2%
::提取有效牌(顺子和兄弟里的最大一张,3张里的不含带牌的最大一张)
if not %px:顺子=.% == %px% set p6yx=%pss1%
if not %px:兄弟=.% == %px% set p6yx=%pss2%
if not %px:三=.% == %px% set p6yx=%pss3%
SYBC 1146830您出的牌: ; ;:115683C%px%
if "%px%" == "违规" (set p2s=%p2sBF%&&set p2h=%p2hBF%&&set p2y=%p2yBF%&&set p2z=%p2zBF%
for /l %%a in (1,1,20) do set p2w%%a=0
call :p11
SYBC 1166830不能这样出.;请重新出牌!
goto :GB)
(ECHO.fB800:%DEBUGQK:;= 20 3e&ECHO.fB800:% 20 3e&ECHO.q%)|DEBUG>NUL
for /l %%a in (1,1,%P6z%) do set /a wz=11220+%%a*3&&call :pa !wz! !p6y:~%%a,1! !p6s:~%%a,1! !p6h:~%%a,1! %p6js%
for /l %%a in (1,1,20) do set p2w%%a=0
sybc 1035030 ▁▁▁▁▁▁ ;$03▉$30 ▏;$03▉$3e 俺要不起!$30▏;$03▉$3e $30╲; $03▇▇▇▇▇▇▇
sybc 1071330 ▁▁▁▁▁▁ ;$03▉$30 ▏;$03▉$3e 俺要不起!$30▏;╱$3e $30▏;$03▇▇▇▇▇▇▇$30
if %p6z% == %p2zBF% goto :win
call :p11
SYBC 11606ce ;:11606ce%p2z%
SYBC 1166830没人要得起.;请继续出牌!
goto :GB
:p1
if "%2" == "" goto :P11
set /a sx0=11808+%2*3,sx1=12408+%2*3
if %1 == 0 sybc %sx0%3e
if %1 == 1 sybc %sx1%3e
:P11
(echo.FB800:B40 FFF 20 3E&echo q)|DEBUG>NUL
for /l %%a in (1,1,%p2z%) do set /a wz=11908+%%a*3,pz=%%a+1&(if !p2w%%a! == 1 set /a wz=!wz!-100)&call :pa !wz! !p2y:~%%a,1! !p2s:~%%a,1! !p2h:~%%a,1! 农 民
goto :eof
:pl
set pl=%2
for %%a in (0,1,20) set /a pq1=%%a*7+5,pq2=%%a*7+6 &&call :pa %1
goto :eof
:pb
sybc %1%pkBK3%▄▄▄▄▄;%pkbk% %pkNB% {\__/} %pkBK% ; %pkNB% / $fc@@%pkNB% \ %pkBK% ; %pkNB%( ($f0oo%pkNB%) )%pkBK% ; %pkNB% / ~~ \ %pkBK%
set /a pbw=%1+500
sybc %pbw%%pkbk% $f2斗 地 主%pkbk% ;%pkBK4%▄▄▄▄▄%pkBK%
goto :eof
:pa
if not "%4" == "" sybc %1%pkBK% ▄▄▄▄ ; $f%2%3%pkNB% %pkBK% ; $f%2%4%pkNB% %5 %pkBK% ; %pkNB% %6 $f%2%4%pkBK% ; %pkNB% $f%2%3%pkBK% ; %pkBK2%▄▄▄▄%pkBK%
goto :eof
:fp
title 发牌中...
for /l %%a in (1,1,20) do set p2w%%a=0
set /a p1z=17,p2z=17,p3z=17
set paid=
set paif=
set paiy=
:FP1
set /a pran+=1,m=0,n=0,d=0
::随机排序54张牌(洗牌)
for %%a in (3 4 5 6 7 8 9 0 J Q K A 2) do (for %%b in (!pkh1!-!pky0! !pkh2!-!pky0! !pkh3!-!pky1! !pkh4!-!pky1!) do (set p%pran%#!random!!random!.%%a-%%b=1))
set P%pran%#!random!!random!.N-!pkh0!-!pky1!=1
set P%pran%#!random!!random!.N-!pkh0!-!pky0!=1
::发牌,并留三张底
set he1=
set he2=
set he3=
set Di=
for /f "tokens=2 delims==." %%a in ('set p%pran%#') do (
set /a m=m%%3+1,n+=1
if !n! leq 51 (
for %%c in (!m!) do (
set he%%c=!he%%c! %%a
)
) else (set di=!di! %%a)
)
echo .%di%. >>d.txt
set pdi1s=!di:~1,1!
set pdi1h=!di:~3,1!
set pdi1y=!di:~5,1!
set pdi2s=!di:~7,1!
set pdi2h=!di:~9,1!
set pdi2y=!di:~11,1!
set pdi3s=!di:~13,1!
set pdi3h=!di:~15,1!
set pdi3y=!di:~17,1!
::整理各家手上的牌
for /l %%a in (1,1,3) do (
for %%b in (!he%%a!) do (
for /f "tokens=1,2,3 delims=-" %%c in ("%%b") do (
set pd%pran%#%%c=!pd%pran%#%%c!%%c
set pf%pran%#%%c=!pf%pran%#%%c!%%d
set py%pran%#%%c=!py%pran%#%%c!%%e
)
)
for %%b in (3 4 5 6 7 8 9 0 J Q K A 2 N) do (
set paid%pran%#=!paid%pran%#!!pd%pran%#%%b!
set paif%pran%#=!paif%pran%#!!pf%pran%#%%b!
set paiy%pran%#=!paiy%pran%#!!py%pran%#%%b!
)
for /f "tokens=1,2,3 delims=." %%b in ("!paid%pran%#!.!paif%pran%#!.!paiy%pran%#!") do (
set p%%as=0%%b
set p%%ah=0%%c
set p%%ay=0%%d
)
)
if "%pdi3s%" == "" goto FP
goto :eof
:timec
IF "%t1%" == "" EXIT /B 0
FOR /F "DELIMS=:. TOKENS=1,2,3,4" %%N IN ("%t1%") DO SET O=1%%O&SET P=1%%P&SET Q=1%%Q&SET /A N=100+%%N
IF "%t2%" == "" SET /A T=N*360000+O*6000+P*100+Q-36610100&&EXIT /B !T!
FOR /F "DELIMS=:. TOKENS=1,2,3,4" %%M IN ("%t2%") DO SET I=1%%N&SET J=1%%O&SET K=1%%P&SET /A H=100+%%M
IF "%t2%" GTR "A" (SET L=%t2%&SET /A T=N*360000+O*6000+P*100+Q-36610100,S=T/100,M=T/6000,H=T/360000) ELSE (SET L=%3&SET /A H=H-N,I=I-O,J=J-P,K=K-Q,T=H*360000+I*6000+J*100+K,S=T/100,M=T/6000,H=T/360000)
IF "%L%" == "" SET L=T
sybc 1176831耗时: 厘秒;:11773$3c!%L%!
goto :eof
Informal Release Dou Di Zhu (Landlord) No AI Test Version
Currently, it can be barely taken out for viewing, but there are still many things that need to be improved and modified.
Any opinions and suggestions are welcome to post a reply or join the QQ group: 3401238
@echo off&SETLOCAL ENABLEDELAYEDEXPANSION&(CHCP 437 &GRAFTABL 936)>NUL
set a=s1=A;s2=2;s3=3;s4=4;s5=5;s6=6;s7=7;s8=8;s9=9;s10=0;s11=J;s12=Q;s13=K;s14=A;s15=2;s16=N;s17=N;h1=;h2=;h3=;h4=;h0=T;y0=c;y1=0;p=1
set pk%a:;=&set pk%
SET SYBCOM=A100;80BE AC00 23C 5472 3CAC 7501 BE13 282;0EEB 3CAC 743A 3C09 740D 8347 1EE 46EB;E8AC 90 A2E8 3C00 7F18 8837 E8C6 84;96E8 3C00 7F4F 882B B0C2 F602 50E2 A0B0;E6F6 15F 57C7 3CAC 7424 E80A 67 45E8;8800 EBD1 E817 3B D188 10EB B0 16CD;E088 4CB4 21CD 815F A0C7 5700 B850 B800;0750 295A 88F5 ACCA 243C D974 3B3C 9274;0D3C DE74 233C 575 D783 EB01 AA01 D088;EBAA E8E4 1E C387 393C 27E 904 FB80;7E39 8003 9C3 F24 E380 B20F F610 E2;88D8 C3C2 3CAC 7420 3CFB 740D 88A5 ACC3;203C F074 D3C 9A74 87C3 2CC3 8030 30EB;0AB4 E4F6 D800 C3
SET V=;RCX;D7;N SYBC.COM;W;Q
if not exist sybc.com (ECHO.%SYBCOM:;=&ECHO.DW %&ECHO.%V:;=&ECHO.%)|DEBUG>NUL
set DEBUGQK=1F8 267;298 307;338 3a7;3D8 447;478 4e7;518 587;5B8 627;658 6c7;6F8 767;798 807;838 8a7;8D8 947;978 9e7;A18 a87;AB8 b27
set pkBK=$7f
set pkBK2=$f7
set pkBK3=$37
set pkBK4=$73
set pkNB=$f1
color 3e
echo Dou Di Zhu Test Version
echo.
echo Currently there is no AI, the computer will not play cards. You can play cards randomly, and the cards will be dealt automatically after playing.
echo.
echo Currently available keys and their functions:
echo F2 Re-deal cards F5 Refresh
echo Arrow keys Control cards Space Bar Play cards
echo.
echo Press any key to start...
sybc
:win
:2
for /l %%b in (3,1,11) do set /a pr=!random!%%4+1&&for /f %%a in ("!pr!") do set pbh%%b=!pkh%%a!&&set pby%%b=!pky0!&&if %%a gtr 2 set pby%%b=!pky1!
for /l %%b in (4,1,12) do set /a pr=!random!%%4+1&&for /f %%a in ("!pr!") do set pch%%b=!pkh%%a!&&set pcy%%b=!pky0!&&if %%a gtr 2 set pcy%%b=!pky1!
call :FP
:1
set titds=$f
cls
set t1=%time%
sybc 10000%TITDS%0 :::│%TITDS%c Product%TITDS%9 Computer Left %TITDS%00 %TITDS%2+0%TITDS%c=%TITDS%00 %TITDS%0│%TITDS%c Dou Di Zhu V0.0 %TITDS%0│%TITDS%0 %TITDS%0│ Bottom Cards │:::
sybc 10100%TITDS%0 ::│%TITDS%c Score%TITDS%9 Computer Right %TITDS%00 %TITDS%2+0%TITDS%c=%TITDS%00 %TITDS%0│%TITDS%9 Developer: SYBN netbenton %TITDS%0│%TITDS%9 Computer Left %TITDS%0│ │::
sybc 10200%TITDS%0 :│%TITDS%c Rank%TITDS%9 Player SYBN %TITDS%00 %TITDS%2+0%TITDS%c=%TITDS%00 %TITDS%0│%TITDS%22010-3-13 Press F1 to view help%TITDS%0│%TITDS%d Call Score 3 points %TITDS%0│ │:
sybc 10168%TITDS%%pdi1y%%pdi1s% %TITDS%%pdi2y%%pdi2s% %TITDS%%pdi3y%%pdi3s%;%TITDS%%pdi1y%%pdi1h% %TITDS%%pdi2y%%pdi2h% %TITDS%%pdi3y%%pdi3h%
call :pb 10701
call :pb 10769
sybc 10300$4c☉$4c▄▄▄▄$4c☉;$c4▌$c9 Computer Left $4c▌;$c4▌$ce Remaining Cards 11张$4c▌;$4c☉$c4▄▄▄▄$4c☉
sybc 10368$4c☉$4c▄▄▄▄$4c☉;$c4▌$c9 Computer Right $4c▌;$c4▌$ce Remaining Cards 7张$4c▌;$4c☉$c4▄▄▄▄$4c☉
sybc 11400$4c☉$4c▄▄▄▄$4c☉;$c4▌$c9 Player SYBN$4c▌;$c4▌$ce Remaining Cards 17张$4c▌;$4c☉$c4▄▄▄▄$4c☉
call :p11
:for /l %%a in (3,1,11) do set /a wz=10352+%%a*3-9*3&&call :pa !wz! !pby%%a! !pks%%a! !pbh%%a! Farmer
:for /l %%a in (4,1,12) do set /a wz=10800+%%a*3&&call :pa !wz! !pcy%%a! !pks%%a! !pch%%a! Landlord
set t2=%time%
call :timec
:GB
::title Please choose the cards you want to play...
set /a GBy=12212,GBs=1
:GB1
set /a GBW=12209+GBs*3
sybc %GBy%f1 ;:%GBw%f1↑
sybc
title sybc-%errorlevel%-
if %errorlevel% == 75 set /a GBs-=1
if %errorlevel% == 77 set /a GBs+=1
if %errorlevel% == 72 set /a p2w%GBs%=1&&call :p11 1 %GBs%
if %errorlevel% == 80 set /a p2w%GBs%=0&&call :p11 0 %GBs%
if %errorlevel% == 57 goto chupai
if %errorlevel% == 60 goto 2
if %errorlevel% == 63 goto 1
if %GBs% lss 1 set gbs=%p2z%
if %GBs% gtr %p2z% set gbs=1
set /a GBy=GBw
goto :GB1
:chupai
set /a p6s=0,p6h=0,p6y=0,p6z=0,p0s=0,p0h=0,p0y=0,p0z=0,p2zBF=%p2z%
set p2sBF=%p2s%
set p2hBF=%p2h%
set p2yBF=%p2y%
for /l %%a in (1,1,%p2z%) do if !p2w%%a! == 1 (set /a p6z=p6z+1&&set p6s=!p6s!!p2s:~%%a,1!&&set p6h=!p6h!!p2h:~%%a,1!&&set p6y=!p6y!!p2y:~%%a,1!&&set p6js=Farmer) else (set /a p0z=p0z+1&&set p0s=!p0s!!p2s:~%%a,1!&&set p0h=!p0h!!p2h:~%%a,1!&&set p0y=!p0y!!p2y:~%%a,1!)
for /l %%a in (1,1,%p0z%) do (set /a p2z=p0z&&set p2s=!p0s!&&set p2h=!p0h!&&set p2y=!p0y!)
:yanzheng
set px=Violation
set p6yx=0
::Mark the cards corresponding to the string
set ps=---34567890JQKA02N$
::Initialize
for /l %%a in (0,1,4) do set pss%%a=0
for %%a in (3 4 5 6 7 8 9 0 J Q K A 2 N) do set ps%%a=0&set p6zs%%a=0
::Calculate the number of cards of each midpoint number
for /l %%a in (1,1,20) do for /f %%b in ("!p6s:~%%a,1!") do set /a ps%%b+=1
::Calculate the number of cards
set /a p6zs=%ps3%+%ps4%+%ps5%+%ps6%+%ps7%+%ps8%+%ps9%+%ps0%+%psj%+%psq%+%psk%+%psa%+%ps2%+%psn%
::Get the marked string %p6ss%
set p6ss=---%ps3%%ps4%%ps5%%ps6%%ps7%%ps8%%ps9%%ps0%%psj%%psq%%psk%%psa%0%ps2%%psn%$
::Extract the largest single card, 2 cards, 3 cards, 4 cards
for /l %%a in (3,1,17) do set pss!p6ss:~%%a,1!=%%a
::Single card
if %p6zs% == 1 set px=One!ps:~%pss1%,1!&set p6yx=%pss1%
::3 cards and planes
::Explanation: %p6ss:3=.% == %p6ss% means there is no 3 in %p6ss%, and if not, it means there is 3 in %p6ss%
if %p6zs% == 3 if not %p6ss:3=.% == %p6ss% set px=Three!ps:~%pss3%,1!
if %p6zs% == 4 if not %p6ss:3=.% == %p6ss% set px=Three!ps:~%pss3%,1! with one!ps:~%pss1%,1!
if %p6zs% == 5 if not %p6ss:3=.% == %p6ss% if not %p6ss:2=.% == %p6ss% set px=Three!ps:~%pss3%,1! with a pair!ps:~%pss2%,1!
if %p6zs% == 6 if not %p6ss:33=.% == %p6ss% set px=Plane
if %p6zs% == 8 if not %p6ss:33=.% == %p6ss% set px=Plane with single card
if %p6zs% == 10 if not %p6ss:33=.% == %p6ss% if %p6ss:1=.% == %p6ss% set px=Plane with pairs
if %p6zs% == 9 if not %p6ss:333=.% == %p6ss% set px=Three consecutive
if %p6zs% == 12 if not %p6ss:333=.% == %p6ss% set px=Three consecutive with single cards
if %p6zs% == 15 if not %p6ss:333=.% == %p6ss% if %p6ss:1=.% == %p6ss% set px=Three consecutive with pairs
if %p6zs% == 12 if not %p6ss:3333=.% == %p6ss% set px=Three large consecutive
if %p6zs% == 16 if not %p6ss:3333=.% == %p6ss% set px=Three large consecutive with single cards
::To prevent something like 333444555666777qqqkkkaa from being mistaken for three large consecutive with pairs, add the following line
set p6ss3=%p6ss:3333=.%
if %p6zs% == 20 if not %p6ss:3333=.% == %p6ss% if %p6ss:1=.% == %p6ss% if %p6ss3:3=.% == %p6ss3% set px=Three large consecutive with pairs
if %p6zs% == 15 if not %p6ss:33333=.% == %p6ss% set px=Three giant consecutive
if %p6zs% == 20 if not %p6ss:33333=.% == %p6ss% set px=Three giant consecutive with single cards
if %p6zs% == 18 if not %p6ss:333333=.% == %p6ss% set px=Three divine consecutive
::Pairs and brothers
if %p6zs% == 2 if %p6ss:1=.% == %p6ss% set px=One pair!ps:~%pss2%,1!&set p6yx=%pss2%
if %p6zs% == 6 if not %p6ss:222=.% == %p6ss% set px=3 brothers
if %p6zs% == 8 if not %p6ss:2222=.% == %p6ss% set px=4 brothers
if %p6zs% == 10 if not %p6ss:22222=.% == %p6ss% set px=5 brothers
if %p6zs% == 12 if not %p6ss:222222=.% == %p6ss% set px=6 brothers
if %p6zs% == 14 if not %p6ss:2222222=.% == %p6ss% set px=7 brothers
if %p6zs% == 16 if not %p6ss:22222222=.% == %p6ss% set px=8 brothers
if %p6zs% == 18 if not %p6ss:222222222=.% == %p6ss% set px=9 brothers
if %p6zs% == 20 if not %p6ss:2222222222=.% == %p6ss% set px=10 brothers
::Straight
if %p6zs% == 5 if not %p6ss:11111=.% == %p6ss% set px=5-card straight
if %p6zs% == 6 if not %p6ss:111111=.% == %p6ss% set px=6-card straight
if %p6zs% == 7 if not %p6ss:1111111=.% == %p6ss% set px=7-card straight
if %p6zs% == 8 if not %p6ss:11111111=.% == %p6ss% set px=8-card straight
if %p6zs% == 9 if not %p6ss:111111111=.% == %p6ss% set px=9-card straight
if %p6zs% == 10 if not %p6ss:1111111111=.% == %p6ss% set px=10-card straight
if %p6zs% == 11 if not %p6ss:11111111111=.% == %p6ss% set px=11-card straight
if %p6zs% == 12 if not %p6ss:111111111111=.% == %p6ss% set px=12-card straight
::Bomb
if %p6zs% == 4 if not %p6ss:4=.% == %p6ss% set px=4 bomb!ps:~%pss4%,1!&set p6yx=%pss4%
if %p6zs% == 2 if not %p6ss:2$=.% == %p6ss% set px=King bomb&set p6yx=%pss2%
::Extract valid cards (the largest one in straight and brothers, the largest one without the carrying card in three cards)
if not %px:Straight=.% == %px% set p6yx=%pss1%
if not %px:Brothers=.% == %px% set p6yx=%pss2%
if not %px:Three=.% == %px% set p6yx=%pss3%
SYBC 1146830The cards you played: ; ;:115683C%px%
if "%px%" == "Violation" (set p2s=%p2sBF%&&set p2h=%p2hBF%&&set p2y=%p2yBF%&&set p2z=%p2zBF%
for /l %%a in (1,1,20) do set p2w%%a=0
call :p11
SYBC 1166830Cannot play like this.;Please re-deal cards!
goto :GB)
(ECHO.fB800:%DEBUGQK:;= 20 3e&ECHO.fB800:% 20 3e&ECHO.q%)|DEBUG>NUL
for /l %%a in (1,1,%P6z%) do set /a wz=11220+%%a*3&&call :pa !wz! !p6y:~%%a,1! !p6s:~%%a,1! !p6h:~%%a,1! %p6js%
for /l %%a in (1,1,20) do set p2w%%a=0
sybc 1035030 ▁▁▁▁▁▁ ;$03▉$30 ▏;$03▉$3e I can't take it! $30▏;$03▉$3e $30╲; $03▇▇▇▇▇▇▇
sybc 1071330 ▁▁▁▁▁▁ ;$03▉$30 ▏;$03▉$3e I can't take it! $30▏;╱$3e $30▏;$03▇▇▇▇▇▇▇$30
if %p6z% == %p2zBF% goto :win
call :p11
SYBC 11606ce ;:11606ce%p2z%
SYBC 1166830No one can take it.;Please continue to play cards!
goto :GB
:p1
if "%2" == "" goto :P11
set /a sx0=11808+%2*3,sx1=12408+%2*3
if %1 == 0 sybc %sx0%3e
if %1 == 1 sybc %sx1%3e
:P11
(echo.FB800:B40 FFF 20 3E&echo q)|DEBUG>NUL
for /l %%a in (1,1,%p2z%) do set /a wz=11908+%%a*3,pz=%%a+1&(if !p2w%%a! == 1 set /a wz=!wz!-100)&call :pa !wz! !p2y:~%%a,1! !p2s:~%%a,1! !p2h:~%%a,1! Farmer
goto :eof
:pl
set pl=%2
for %%a in (0,1,20) set /a pq1=%%a*7+5,pq2=%%a*7+6 &&call :pa %1
goto :eof
:pb
sybc %1%pkBK3%▄▄▄▄▄;%pkbk% %pkNB% {\__/} %pkBK% ; %pkNB% / $fc@@%pkNB% \ %pkBK% ; %pkNB%( ($f0oo%pkNB%) )%pkBK% ; %pkNB% / ~~ \ %pkBK%
set /a pbw=%1+500
sybc %pbw%%pkbk% $f2Dou Di Zhu%pkbk% ;%pkBK4%▄▄▄▄▄%pkBK%
goto :eof
:pa
if not "%4" == "" sybc %1%pkBK% ▄▄▄▄ ; $f%2%3%pkNB% %pkBK% ; $f%2%4%pkNB% %5 %pkBK% ; %pkNB% %6 $f%2%4%pkBK% ; %pkNB% $f%2%3%pkBK% ; %pkBK2%▄▄▄▄%pkBK%
goto :eof
:fp
title Dealing cards...
for /l %%a in (1,1,20) do set p2w%%a=0
set /a p1z=17,p2z=17,p3z=17
set paid=
set paif=
set paiy=
:FP1
set /a pran+=1,m=0,n=0,d=0
::Randomly sort 54 cards (shuffle)
for %%a in (3 4 5 6 7 8 9 0 J Q K A 2) do (for %%b in (!pkh1!-!pky0! !pkh2!-!pky0! !pkh3!-!pky1! !pkh4!-!pky1!) do (set p%pran%#!random!!random!.%%a-%%b=1))
set P%pran%#!random!!random!.N-!pkh0!-!pky1!=1
set P%pran%#!random!!random!.N-!pkh0!-!pky0!=1
::Deal cards and leave three bottom cards
set he1=
set he2=
set he3=
set Di=
for /f "tokens=2 delims==." %%a in ('set p%pran%#') do (
set /a m=m%%3+1,n+=1
if !n! leq 51 (
for %%c in (!m!) do (
set he%%c=!he%%c! %%a
)
) else (set di=!di! %%a)
)
echo .%di%. >>d.txt
set pdi1s=!di:~1,1!
set pdi1h=!di:~3,1!
set pdi1y=!di:~5,1!
set pdi2s=!di:~7,1!
set pdi2h=!di:~9,1!
set pdi2y=!di:~11,1!
set pdi3s=!di:~13,1!
set pdi3h=!di:~15,1!
set pdi3y=!di:~17,1!
::Organize the cards in each player's hand
for /l %%a in (1,1,3) do (
for %%b in (!he%%a!) do (
for /f "tokens=1,2,3 delims=-" %%c in ("%%b") do (
set pd%pran%#%%c=!pd%pran%#%%c!%%c
set pf%pran%#%%c=!pf%pran%#%%c!%%d
set py%pran%#%%c=!py%pran%#%%c!%%e
)
)
for %%b in (3 4 5 6 7 8 9 0 J Q K A 2 N) do (
set paid%pran%#=!paid%pran%#!!pd%pran%#%%b!
set paif%pran%#=!paif%pran%#!!pf%pran%#%%b!
set paiy%pran%#=!paiy%pran%#!!py%pran%#%%b!
)
for /f "tokens=1,2,3 delims=." %%b in ("!paid%pran%#!.!paif%pran%#!.!paiy%pran%#!") do (
set p%%as=0%%b
set p%%ah=0%%c
set p%%ay=0%%d
)
)
if "%pdi3s%" == "" goto FP
goto :eof
:timec
IF "%t1%" == "" EXIT /B 0
FOR /F "DELIMS=:. TOKENS=1,2,3,4" %%N IN ("%t1%") DO SET O=1%%O&SET P=1%%P&SET Q=1%%Q&SET /A N=100+%%N
IF "%t2%" == "" SET /A T=N*360000+O*6000+P*100+Q-36610100&&EXIT /B !T!
FOR /F "DELIMS=:. TOKENS=1,2,3,4" %%M IN ("%t2%") DO SET I=1%%N&SET J=1%%O&SET K=1%%P&SET /A H=100+%%M
IF "%t2%" GTR "A" (SET L=%t2%&SET /A T=N*360000+O*6000+P*100+Q-36610100,S=T/100,M=T/6000,H=T/360000) ELSE (SET L=%3&SET /A H=H-N,I=I-O,J=J-P,K=K-Q,T=H*360000+I*6000+J*100+K,S=T/100,M=T/6000,H=T/360000)
IF "%L%" == "" SET L=T
sybc 1176831Elapsed time: centiseconds;:11773$3c!%L%!
goto :eof
|

SYBNQQ:354324773
|
|
2010-3-14 17:53 |
|
|
sl543001
中级用户
  
积分 499
发帖 225
注册 2008-12-30
状态 离线
|
『第 26 楼』:
使用 LLM 解释/回答一下
压缩了部分代码,牺牲了可读性,提高了一点速度!
Compressed part of the code, sacrificed readability, improved a little speed!
|

SYBNQQ:354324773
|
|
2010-3-16 17:30 |
|
|
sl543001
中级用户
  
积分 499
发帖 225
注册 2008-12-30
状态 离线
|
『第 27 楼』:
使用 LLM 解释/回答一下
找到了新的合作者PLP
这在计划整理重写代码
Found a new collaborator PLP. This is in the plan to organize and rewrite the code
|

SYBNQQ:354324773
|
|
2010-3-20 14:36 |
|
|
sl543001
中级用户
  
积分 499
发帖 225
注册 2008-12-30
状态 离线
|
『第 28 楼』:
发布前半部分代码的逐行解释
使用 LLM 解释/回答一下
@echo off&SETLOCAL ENABLEDELAYEDEXPANSION&(CHCP 437 &GRAFTABL 936)>NUL
::变量初始化
::玩家1-3 的牌统一使用P1XXX-p3XXX变量 P4XXX保留 玩家出的牌统一使用P5XXX-P6XXX P7XXX保留 P0XXX 用于临时需要
::与扑克有关的变量牌统一使用PKXXX
:: PKSXX代表各个点数的牌与字符的对应值 pks11=J pks12=Q
:: PKHX代表各个花色的数字与字符的对应值 pkh1= (红桃) pkh0=T (王)
:: PKYX代表各个颜色的数字与字符的对应值 扑克只有红黑2色 pky0=c (红) pky1=0 (黑) (同color命令)
set a=s1=A;s2=2;s3=3;s4=4;s5=5;s6=6;s7=7;s8=8;s9=9;s10=0;s11=J;s12=Q;s13=K;s14=A;s15=2;s16=N;s17=N;h1=;h2=;h3=;h4=;h0=T;y0=c;y1=0;BK=$7f;BK2=$f7;BK3=$37;BK4=$73;NB=$f1;p=1
set pk%a:;=&set pk%
::载入/生成sybc 变量SYBCOM保存SYBC的16进制数据 V保存DEBUG代码 最后通过管道交由DEBUG执行
SET SYBCOM=A100;80BE AC00 23C 5472 3CAC 7501 BE13 282;0EEB 3CAC 743A 3C09 740D 8347 1EE 46EB;E8AC 90 A2E8 3C00 7F18 8837 E8C6 84;96E8 3C00 7F4F 882B B0C2 F602 50E2 A0B0;E6F6 15F 57C7 3CAC 7424 E80A 67 45E8;8800 EBD1 E817 3B D188 10EB B0 16CD;E088 4CB4 21CD 815F A0C7 5700 B850 B800;0750 295A 88F5 ACCA 243C D974 3B3C 9274;0D3C DE74 233C 575 D783 EB01 AA01 D088;EBAA E8E4 1E C387 393C 27E 904 FB80;7E39 8003 9C3 F24 E380 B20F F610 E2;88D8 C3C2 3CAC 7420 3CFB 740D 88A5 ACC3;203C F074 D3C 9A74 87C3 2CC3 8030 30EB;0AB4 E4F6 D800 C3
SET V=;RCX;D7;N SYBC.COM;W;Q
if not exist sybc.com (ECHO.%SYBCOM:;=&ECHO.DW %&ECHO.%V:;=&ECHO.%)|DEBUG>NUL
::保存刷新块坐标 游戏界面中间部分(出牌的位置),每次需要局部刷新,变量DEBUGQK保存要刷新的内存地址起止点
set DEBUGQK=1F8 267;298 307;338 3a7;3D8 447;478 4e7;518 587;5B8 627;658 6c7;6F8 767;798 807;838 8a7;8D8 947;978 9e7;A18 a87;AB8 b27
::初始信息
color 3e
echo 斗地主 {注释版} 2010-3-20
echo.
echo 目前没有AI,电脑不会出牌.你可以随便出牌,出完自动发牌.
echo.
echo 目前可用按键及其功能:
echo F2 从新发牌 F5 刷新
echo 方向键 控制扑克 空格 出牌
echo.
echo 按任意键开始...
sybc
:2
::调用发牌模块
call :FP
:1
::变量CBXX统一用于颜色背景信息
set cB0=$f
cls
::计时1
set t1=%time%
::显示顶部栏
sybc 10000%cB0%0 :::│%cB0%c积%cB0%9 电脑左 %cB0%00 %cB0%2+0%cB0%c=%cB0%00 %cB0%0│%cB0%c 斗地主 V0.0 %cB0%0│%cB0%0 %cB0%0│ 底 牌 │:::
sybc 10100%cB0%0 ::│%cB0%c分%cB0%9 电脑右 %cB0%00 %cB0%2+0%cB0%c=%cB0%00 %cB0%0│%cB0%9开发:SYBN netbenton plp %cB0%0│%cB0%9 电脑左 %cB0%0│ │::
sybc 10200%cB0%0 :│%cB0%c榜%cB0%9 玩家SYBN %cB0%00 %cB0%2+0%cB0%c=%cB0%00 %cB0%0│%cB0%22010-3-20 按F1查看帮助%cB0%0│%cB0%d 叫分 3分 %cB0%0│ │:
sybc 10168%cB0%%pdi1y%%pdi1s% %cB0%%pdi2y%%pdi2s% %cB0%%pdi3y%%pdi3s%;%cB0%%pdi1y%%pdi1h% %cB0%%pdi2y%%pdi2h% %cB0%%pdi3y%%pdi3h%
::显示电脑的牌背
call :pb 10701
call :pb 10769
::显示3人的名称框
sybc 10300$4c☉$4c▄▄▄▄$4c☉;$c4▌$c9 电脑左 $4c▌;$c4▌$ce余牌11张$4c▌;$4c☉$c4▄▄▄▄$4c☉
sybc 10368$4c☉$4c▄▄▄▄$4c☉;$c4▌$c9 电脑右 $4c▌;$c4▌$ce余牌7 张$4c▌;$4c☉$c4▄▄▄▄$4c☉
sybc 11400$4c☉$4c▄▄▄▄$4c☉;$c4▌$c9玩家SYBN$4c▌;$c4▌$ce余牌17张$4c▌;$4c☉$c4▄▄▄▄$4c☉
::P11显示玩家的牌
call :p11
::计时2
set t2=%time%
::计算时差并显示
call :timec
:GB
title 请选择您要出的牌...
::初始化选牌指针 变量GBy为原指针位置
set /a GBy=12212,GBs=1
:GB1
::定位选牌指针 变量GBW为新指针位置
set /a GBW=12209+GBs*3
::显示选牌指针并擦除原指针
sybc %GBy%f1 ;:%GBw%f1↑
::无参数的SYBC功能类似CHOICE,暂停脚本并获取一个按键
sybc
::下一行,显示所按的键
::title sybc-%errorlevel%-
::根据不同的按键执行相应的操作
:: 左右键移动光标
if %errorlevel% == 75 set /a GBs-=1
if %errorlevel% == 77 set /a GBs+=1
:: 上下键拉起/放下扑克 并刷新玩家的牌
if %errorlevel% == 72 set /a p2w%GBs%=1&&call :p11 1 %GBs%
if %errorlevel% == 80 set /a p2w%GBs%=0&&call :p11 0 %GBs%
:: 空格 出牌
if %errorlevel% == 57 goto chupai
:: F2 重新发牌
if %errorlevel% == 60 goto 2
:: F5 刷新
if %errorlevel% == 63 goto 1
::指针超出高低极限则恢复
if %GBs% lss 1 set gbs=%p2z%
if %GBs% gtr %p2z% set gbs=1
::保存原指针等待擦除
set /a GBy=GBw
goto :GB1
```batch
@echo off&SETLOCAL ENABLEDELAYEDEXPANSION&(CHCP 437 &GRAFTABL 936)>NUL
:: Variable initialization
:: The cards for players 1-3 are uniformly used with P1XXX-p3XXX variables, P4XXX is reserved. The cards played by players are uniformly used with P5XXX-P6XXX, P7XXX is reserved, and P0XXX is for temporary needs.
:: Variables related to poker cards are uniformly used with PKXXX
:: PKSXX represents the corresponding values of each point card and character: pks11=J, pks12=Q
:: PKHX represents the corresponding values of each suit number and character: pkh1= (heart), pkh0=T (king)
:: PKYX represents the corresponding values of each color number and character: Poker has only 2 colors, red and black. pky0=c (red), pky1=0 (black) (same as the color command)
set a=s1=A;s2=2;s3=3;s4=4;s5=5;s6=6;s7=7;s8=8;s9=9;s10=0;s11=J;s12=Q;s13=K;s14=A;s15=2;s16=N;s17=N;h1=;h2=;h3=;h4=;h0=T;y0=c;y1=0;BK=$7f;BK2=$f7;BK3=$37;BK4=$73;NB=$f1;p=1
set pk%a:;=&set pk%
:: Load/generate sybc variable SYBCOM saves the hexadecimal data of SYBC, V saves DEBUG code, and finally is executed by DEBUG through the pipe
SET SYBCOM=A100;80BE AC00 23C 5472 3CAC 7501 BE13 282;0EEB 3CAC 743A 3C09 740D 8347 1EE 46EB;E8AC 90 A2E8 3C00 7F18 8837 E8C6 84;96E8 3C00 7F4F 882B B0C2 F602 50E2 A0B0;E6F6 15F 57C7 3CAC 7424 E80A 67 45E8;8800 EBD1 E817 3B D188 10EB B0 16CD;E088 4CB4 21CD 815F A0C7 5700 B850 B800;0750 295A 88F5 ACCA 243C D974 3B3C 9274;0D3C DE74 233C 575 D783 EB01 AA01 D088;EBAA E8E4 1E C387 393C 27E 904 FB80;7E39 8003 9C3 F24 E380 B20F F610 E2;88D8 C3C2 3CAC 7420 3CFB 740D 88A5 ACC3;203C F074 D3C 9A74 87C3 2CC3 8030 30EB;0AB4 E4F6 D800 C3
SET V=;RCX;D7;N SYBC.COM;W;Q
if not exist sybc.com (ECHO.%SYBCOM:;=&ECHO.DW %&ECHO.%V:;=&ECHO.%)|DEBUG>NUL
:: Save the coordinates of the refresh block, the middle part of the game interface (the position to play cards). Each time partial refresh is needed, the variable DEBUGQK saves the start and end addresses of the memory to be refreshed
set DEBUGQK=1F8 267;298 307;338 3a7;3D8 447;478 4e7;518 587;5B8 627;658 6c7;6F8 767;798 807;838 8a7;8D8 947;978 9e7;A18 a87;AB8 b27
:: Initial information
color 3e
echo Dou Di Zhu {Comment Version} 2010-3-20
echo.
echo Currently there is no AI, the computer will not play cards. You can play cards randomly, and the cards will be dealt automatically after playing.
echo.
echo Currently available keys and their functions:
echo F2 Re-deal cards F5 Refresh
echo Arrow keys Control poker Space Play card
echo.
echo Press any key to start...
sybc
:2
:: Call the deal card module
call :FP
:1
:: Variable CBXX is uniformly used for color background information
set cB0=$f
cls
:: Timing 1
set t1=%time%
:: Display the top bar
sybc 10000%cB0%0 :::│%cB0%c Score%cB0%9 Left computer %cB0%00 %cB0%2+0%cB0%c=%cB0%00 %cB0%0│%cB0%c Dou Di Zhu V0.0 %cB0%0│%cB0%0 %cB0%0│ Bottom cards │:::
sybc 10100%cB0%0 ::│%cB0%c Points%cB0%9 Right computer %cB0%00 %cB0%2+0%cB0%c=%cB0%00 %cB0%0│%cB0%9Developed: SYBN netbenton plp %cB0%0│%cB0%9 Left computer %cB0%0│ │::
sybc 10200%cB0%0 :│%cB0%c Ranking%cB0%9 Player SYBN %cB0%00 %cB0%2+0%cB0%c=%cB0%00 %cB0%0│%cB0%22010-3-20 Press F1 to view help%cB0%0│%cB0%d Call score 3 points %cB0%0│ │:
sybc 10168%cB0%%pdi1y%%pdi1s% %cB0%%pdi2y%%pdi2s% %cB0%%pdi3y%%pdi3s%;%cB0%%pdi1y%%pdi1h% %cB0%%pdi2y%%pdi2h% %cB0%%pdi3y%%pdi3h%
:: Display the back of the computer's cards
call :pb 10701
call :pb 10769
:: Display the name boxes of 3 people
sybc 10300$4c☉$4c▄▄▄▄$4c☉;$c4▌$c9 Left computer $4c▌;$c4▌$ce Remaining cards 11 pieces $4c▌;$4c☉$c4▄▄▄▄$4c☉
sybc 10368$4c☉$4c▄▄▄▄$4c☉;$c4▌$c9 Right computer $4c▌;$c4▌$ce Remaining cards 7 pieces $4c▌;$4c☉$c4▄▄▄▄$4c☉
sybc 11400$4c☉$4c▄▄▄▄$4c☉;$c4▌$c9 Player SYBN$4c▌;$c4▌$ce Remaining cards 17 pieces $4c▌;$4c☉$c4▄▄▄▄$4c☉
:: P11 displays the player's cards
call :p11
:: Timing 2
set t2=%time%
:: Calculate the time difference and display
call :timec
:GB
title Please choose the cards you want to play...
:: Initialize the card selection pointer, variable GBy is the original pointer position
set /a GBy=12212,GBs=1
:GB1
:: Locate the card selection pointer, variable GBW is the new pointer position
set /a GBW=12209+GBs*3
:: Display the card selection pointer and erase the original pointer
sybc %GBy%f1 ;:%GBw%f1↑
:: The SYBC function without parameters is similar to CHOICE, pauses the script and gets a key
sybc
:: Next line, display the pressed key
::title sybc-%errorlevel%-
:: Perform corresponding operations according to different keys
:: Left and right arrows move the cursor
if %errorlevel% == 75 set /a GBs-=1
if %errorlevel% == 77 set /a GBs+=1
:: Up and down arrows raise/lower the poker and refresh the player's cards
if %errorlevel% == 72 set /a p2w%GBs%=1&&call :p11 1 %GBs%
if %errorlevel% == 80 set /a p2w%GBs%=0&&call :p11 0 %GBs%
:: Space bar Play card
if %errorlevel% == 57 goto chupai
:: F2 Re-deal cards
if %errorlevel% == 60 goto 2
:: F5 Refresh
if %errorlevel% == 63 goto 1
:: If the pointer exceeds the high and low limits, restore
if %GBs% lss 1 set gbs=%p2z%
if %GBs% gtr %p2z% set gbs=1
:: Save the original pointer for erasing
set /a GBy=GBw
goto :GB1
```
|

SYBNQQ:354324773
|
|
2010-3-20 15:13 |
|
|
doslike
版主
        系统收藏家
积分 326
发帖 285
注册 2010-2-22 来自 黑龙江省
状态 离线
|
|
2010-3-21 12:30 |
|
|
sl543001
中级用户
  
积分 499
发帖 225
注册 2008-12-30
状态 离线
|
|
2010-3-24 12:37 |
|
|