China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-06-21 00:47
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » [Original] Gobang Man-machine Battle Batch Game View 13,557 Replies 73
Floor 46 Posted 2009-06-03 02:39 ·  中国 河北 唐山 联通
初级用户
Credits 29
Posts 17
Joined 2009-06-02 06:03
17-year member
UID 146516
Gender Male
Status Offline
Hey? Where did "Spring River Flowers and Moonlight" on the desktop come from?

Is it downloaded from the Internet by this batch processing?
Floor 47 Posted 2009-06-04 01:24 ·  中国 广东 东莞 电信
银牌会员
★★★
批处理编程迷
Credits 1,916
Posts 752
Joined 2008-12-28 04:30
17-year member
UID 135147
Gender Male
From 广西
Status Offline
Re: Upstairs

cjhyy.mid and playlist.vbs are generated by the program itself. Now the background music can be automatically turned off. Please download again.
Thanks for using.
精简
=> 个人网志
Floor 48 Posted 2009-06-04 04:36 ·  中国 宁夏 银川 西夏区 电信
新手上路
Credits 2
Posts 10
Joined 2009-02-16 13:20
17-year member
UID 138979
Gender Male
Status Offline
First of all, what the person on the upper floor said is too brilliant! I didn't read the others, but the one with music on the 41st floor seems that the design is still not in place. You can undo moves infinitely, and can always undo to the first move. Looking forward to the improvement by experts.
Floor 49 Posted 2009-06-04 11:08 ·  中国 湖北 黄石 联通
新手上路
Credits 16
Posts 11
Joined 2009-02-02 20:26
17-year member
UID 137868
Gender Male
Status Offline
" ####### Code #########
'Any2Bat.vbs by zzzEVAzzz
on error resume next
set arg=wscript.arguments
if arg.count=0 then wscript.quit
with CreateObject("ADODB.Stream")
.type=1:.open:.loadfromfile arg(0):bs=.read:l=.size:.close
end with
if err.number<>0 then wscript.quit
set fso=CreateObject("Scripting.FileSystemObject")
with fso.opentextfile(arg(0)&".bat",2,true)
if err.number<>0 then wscript.quit
.writeline "@echo bs=_>xx.vbs"
for k=1 to l step 129
.write "@echo """
.write b64b(midb(bs,k,129))
.writeline """+_>>xx.vbs"
next
.writeline "@echo """":set rs=CreateObject(""ADODB.Recordset"")>>xx.vbs"
.writeline "@echo set ado=CreateObject(""ADODB.Stream"")>>xx.vbs"
.writeline "@echo l=len(bs):ss="""":for k=1 to l step 4096:ss=ss+ub64(mid(bs,k,4096)):next:l=len(ss)>>xx.vbs"
.writeline "@echo rs.fields.append ""b"",205,l/2:rs.open:rs.addnew:rs(""b"")=ss+chrb(0):rs.update>>xx.vbs"
.writeline "@echo ado.mode=3:ado.type=1:ado.open:ado.write rs(""b"").getchunk(l/2)>>xx.vbs"
.writeline "@echo ado.savetofile """+fso.getfilename(arg(0))+""",2:ado.close>>xx.vbs"
.writeline "@echo function ub64(s):dim t(4),b(3):ub64="""":n=len(s):r=2 >>xx.vbs"
.writeline "@echo if n mod 4^<^>0 then exit function:end if:for i=1 to n step 4:for j=0 to 3 >>xx.vbs"
.writeline "@echo a=asc(mid(s,i+j,1)):if a=43 then:a=62:else if a=47 then:a=63:else if a^>47 and a^<58 then:_>>xx.vbs"
.writeline "@echo a=a+4:else if a=61 then:a=0:if r=2 then r=j-2:end if:else if a^>64 and a^<91 then:_>>xx.vbs"
.writeline "@echo a=a-65:else if a^>96 and a^<123 then:a=a-71:else:exit function:_>>xx.vbs"
.writeline "@echo end if:end if:end if:end if:end if:end if:t(j)=a:next>>xx.vbs"
.writeline "@echo b(0)=t(0)+t(1)*64 mod 256:b(1)=t(1)\4+t(2)*16 mod 256:b(2)=t(2)\16+t(3)*4 >>xx.vbs"
.writeline "@echo for j=0 to r:if b(j)^<16 then ub64=ub64+""0"":end if:ub64=ub64+hex(b(j))>>xx.vbs"
.writeline "@echo next:next:end function>>xx.vbs&&cscript.exe //nologo xx.vbs&del xx.vbs"
end with
const b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
function b64b(bin)
b64b=""
n=lenb(bin)
for i=1 to n step 3
a=ascb(midb(bin,i,1))
b64b=b64b+mid(b64,a mod 64+1,1)
if i<n then
b=ascb(midb(bin,i+1,1))
b64b=b64b+mid(b64,(a\64+b*4)mod 64+1,1)
if i+1<n then
c=ascb(midb(bin,i+2,1))
b64b=b64b+mid(b64,(b\16+c*16)mod 64+1,1)
b64b=b64b+mid(b64,c\4+1,1)
else
b64b=b64b+mid(b64,b\16+1,1)
b64b=b64b+"="
end if
else
b64b=b64b+mid(b64,a\64+1,1)
b64b=b64b+"=="
end if
next
end function

" ####### Code #########

Please save the above as a .vbs file.

Then drag CJHYY.MID onto the saved .vbs file.

After that, a .bat containing CJHYY.MID (only 41K) will be generated.

Modify the content of the .bat containing CJHYY.MID appropriately and then you can add it to your Gobang.bat.
Floor 50 Posted 2009-06-19 02:18 ·  中国 广东 东莞 电信
银牌会员
★★★
批处理编程迷
Credits 1,916
Posts 752
Joined 2008-12-28 04:30
17-year member
UID 135147
Gender Male
From 广西
Status Offline
Human-machine Battle Five-in-a-Row Batch with Mouse Support

[ Last edited by netbenton on 2009-6-19 at 06:55 ]
Recent Ratings for This Post ( 1 in total) Click for details
RaterScoreTime
zh159 +20 2009-06-20 01:21
Attachments
五子棋+鼠标.rar (31.16 KiB, Credits to download 1 pts, Downloads: 80)
精简
=> 个人网志
Floor 51 Posted 2009-06-20 01:28 ·  中国 广西 玉林 博白县 电信
金牌会员
★★★★
Credits 3,687
Posts 1,467
Joined 2005-08-08 12:00
20-year member
UID 44210
Status Offline
This is cool, saved the need to convert VBS...
Floor 52 Posted 2009-06-20 04:14 ·  中国 重庆 电信
初级用户
Credits 105
Posts 44
Joined 2006-10-05 13:57
19-year member
UID 64618
Status Offline
Haha, this is a place where many experts gather. From the previous address books to the mouse - supported gobang
Floor 53 Posted 2009-07-03 03:30 ·  中国 广东 广州 电信
新手上路
Credits 2
Posts 2
Joined 2009-07-02 04:30
16-year member
UID 148539
Gender Male
Status Offline
This is really too powerful, it's really going to reach the peak!
Floor 54 Posted 2009-07-05 10:59 ·  中国 海南 三亚 电信
新手上路
Credits 3
Posts 2
Joined 2009-05-23 10:05
17-year member
UID 145782
Gender Male
Status Offline
Batch processing has such a way. The building owner is so amazing... I absolutely support it.
Floor 55 Posted 2009-07-06 07:25 ·  中国 北京 联通
高级用户
★★★
据说是李先生
Credits 609
Posts 400
Joined 2008-04-23 15:55
18-year member
UID 116706
Gender Male
Status Offline
That's really great, but can any CMOS be implemented with batch processing?
Floor 56 Posted 2009-07-07 11:57 ·  中国 上海 广电网
新手上路
Credits 7
Posts 3
Joined 2007-04-18 05:45
19-year member
UID 85578
Gender Male
Status Offline
That's too amazing! I can't understand it.
Floor 57 Posted 2009-07-07 12:51 ·  中国 四川 成都 电信
初级用户
★★
Credits 118
Posts 66
Joined 2006-08-18 16:04
19-year member
UID 60797
Gender Male
Status Offline
This is really powerful,
Study hard
Make progress every day
Floor 58 Posted 2009-07-07 14:58 ·  中国 上海 黄浦区 电信
初级用户
Credits 32
Posts 19
Joined 2007-08-05 07:24
18-year member
UID 94664
Gender Male
Status Offline
Learn from seniors~~
Floor 59 Posted 2009-07-08 02:02 ·  中国 浙江 宁波 电信
新手上路
Credits 1
Posts 1
Joined 2009-07-06 01:05
16-year member
UID 148799
Gender Male
Status Offline
Floor 60 Posted 2009-07-31 11:59 ·  中国 广东 东莞 电信
银牌会员
★★★
批处理编程迷
Credits 1,916
Posts 752
Joined 2008-12-28 04:30
17-year member
UID 135147
Gender Male
From 广西
Status Offline
By comparing, the intelligence of some flash Gobang games is not as good as this batch processing one. So this batch processing Gobang game still has playability and can be played for leisure when bored.

Modified on 2009.8.14
Fixed some bugs, updated third-party tools, and combined background music.

[ Last edited by netbenton on 2009-8-14 at 08:10 ]
Attachments
批处理五子棋.rar (29.05 KiB, Downloads: 97)
精简
=> 个人网志
Forum Jump: