『楼 主』:
空间随机游动粒子+贪吃蛇初版
-----------------------空间随机游动粒子----------------------------
@echo off
setlocal enabledelayedexpansion
mode con cols=60 lines=30
for /l %%a in (1,1,60) do (set space= !space!)
set /a line=14,col=29
:loop
set /a linenext=%random%%%30
set /a colnext=%random%%%60
for %%a in (line col) do (
if !%%a! lss !%%anext! (set %%aadd=+) else (set %%aadd=-)
)
:loop-1
if %line% neq %linenext% (
set /a line%lineadd%=1
) else (
set /a col%coladd%=1
)
cls
for /l %%a in (1,1,%line%) do echo,
echo,!space:~0,%col%!*
for /l %%a in (1,1,200) do (echo,>nul)
if %col% neq %colnext% (goto :loop-1)
goto :loop ----------------------类似贪食蛇
@echo off
title made by 523066680
setlocal enabledelayedexpansion
mode con cols=61 lines=31
for /l %%a in (1,1,60) do (set space= !space!)
for /l %%a in (1,1,30) do (set L%%a=%space%)
set /a line=15,col=29,i=0
:loop
set /a linenext=%random%%%30+1,colnext=%random%%%60
for %%a in (line col) do (
if !%%a! lss !%%anext! (set %%aadd=+) else (set %%aadd=-)
)
:loop-1
if %i% lss 20 (set /a i+=1) else (set i=1)
if defined cut%i% (
!cut%i%:"=!
set "L%a%=!L%a%:~0,%b%! !L%a%:~%c%!"
)
set /a C2=col+1
set "L%line%=!L%line%:~0,%col%!*!L%line%:~%C2%!"
set cut%i%="set /a a=%line%,b=%col%,c=%C2%"
cls
for /l %%a in (1,1,30) do echo,!L%%a!
for /l %%a in (1,1,300) do (echo,>nul)
if %line% neq %linenext% (
set /a line%lineadd%=1
) else (
set /a col%coladd%=1
)
if %col% neq %colnext% (goto :loop-1)
goto :loop [ Last edited by 523066680 on 2008-10-1 at 08:38 ]
此帖被 +21 点积分 点击查看详情 评分人:【 BC 】 | 分数: +1 | 时间:2008-9-21 09:09 | 评分人:【 pusofalse 】 | 分数: +7 | 时间:2008-9-21 09:21 | 评分人:【 zqz0012005 】 | 分数: +3 | 时间:2008-9-28 23:21 | 评分人:【 radem 】 | 分数: +2 | 时间:2008-9-30 21:16 | 评分人:【 netbenton 】 | 分数: +8 | 时间:2009-5-7 09:11 |
|
|