|
本帖最后由 9001 于 2020-5-19 01:38 编辑
- #code=936T950
- ENVI^ EnviMode=1
- ENVI^ ForceLocal=1
- FILE -force "%&CurDir%\11.txt"
- PUTF -dd -len=0 "%&CurDir%\11.txt",0,zero
- CALC #&i=1+0
- WRIT "%&CurDir%\11.txt",$+0, 第%&i%轮:
- CALL @autoWALL
- _SUB autoWALL,#
- TIME &Timer,0, CALL CalcRand
- LIST &NumCountA,L0T0W0H0,,,,0x10
- LIST &NumCountB,L0T0W0H0,,,,0x10
- CALL CalcRand
- _END
- _SUB CalcRand
- ENVI @&Timer=0
- HKEY$ #114, --del
- ENVI @&NumCountA.Query=10;&Total
- IFEX $%&Total%>0,
- {
- CALC #&i=%&i%+1
- IFEX $%&i%<4,WRIT "%&CurDir%\11.txt",$+0, 第%&i%轮:
- IFEX $%&i%=4,
- {
- WRIT "%&CurDir%\11.txt",$+0,A队 B队
- EXIT
- }
-
- ENVI @&NumCountA.Val=
- ENVI @&NumCountB.Val=
- }
- LOOP #1=1,
- {
- CALC #&RandNumA=RAND(10)
- CALC #&RandNumA=%&RandNumA%+1
- ENVI @&NumCountA.SEL=%&RandNumA%
- IFEX $%&RandNumA%<>%&NumCountA%,
- {
- ENVI @&NumCountA.ADDSEL=%&RandNumA%
- EXIT
- }
- }
- LOOP #1=1,
- {
- CALC #&RandNumB=RAND(10)
- CALC #&RandNumB=%&RandNumB%+1
- ENVI @&NumCountB.SEL=%&RandNumB%
- IFEX $%&RandNumB%<>%&NumCountB%,
- {
- ENVI @&NumCountB.ADDSEL=%&RandNumB%
- WRIT "%&CurDir%\11.txt",$+0,%&NumCountA% %&NumCountB%
- ENVI @&Timer=1000
- HKEY$ #114, ENVI @&Timer=1
- EXIT
- }
- }
- _END
复制代码
|
|