主题:[讨论]谁能解此难题!
DECLARE SUB htu (b1!, b2!, b3!, b4!)
CLS
SCREEN 12
RANDOMIZE TIMER
X = 420: Y = 270
DIM R(300), G(300), T(300), N(300), P(300), bb(30, 300)
FOR i = 1 TO 4: READ A(i), B(i): NEXT i
DATA -1,0,0,1,1,0,0,-1
FOR i = 1 TO 4: READ C(i), D(i), E(i), F(i): NEXT i
DATA 15,20,15,-10,25,30,55,30,15,40,15,70,15,30,-25,30
LOCATE 12, 35
PRINT "LOADING..."
FOR i = 1 TO 200000
NEXT i
SLEEP .5
W = 1
FOR i = 1 TO 20
FOR j = 1 TO 30
bb(i, j) = INT(RND * 4)
NEXT j, i
DO
GOSUB 100
FOR i = 1 TO 300
IF P(i) = 1 THEN
CIRCLE (R(i), G(i)), 4, 3
R(i) = R(i) + T(i) * 7: G(i) = G(i) + N(i) * 7
IF R(i) > 640 OR R(i) < 0 AND G(i) > 480 OR G(i) < 0 THEN P(i) = 0: R = R - 1
END IF
NEXT i
FOR i = 1 TO 20000: NEXT i
LINE (640, 480)-(0, 0), 0, BF
FOR i = 1 TO 20
FOR j = 1 TO 30
IF bb(i, j) = 1 THEN CALL htu(j * 28, i * 28, j * 28 + 28, i * 28 + 28)
NEXT j, i
K$ = UCASE$(INKEY$)
GOSUB 200
LOOP UNTIL K$ = CHR$(27)
CLS
LOCATE 12, 35
PRINT "Thank you!"
END
100
REM tan ke
LINE (X, Y)-(X + 30, Y + 50), 2, BF
LINE (X, Y)-(X + 5, Y + 50), 1, BF
LINE (X + 25, Y)-(X + 30, Y + 50), 1, BF
LINE (X + 5, Y + 25)-(X + 25, Y + 40), 1, B
Q = X + E(W): B = Y + F(W)
LINE (X + C(W), Y + D(W))-(X + E(W), Y + F(W))
RETURN
200
REM cao zuo
IF K$ = "W" THEN W = 1
IF K$ = "D" THEN W = 2
IF K$ = "S" THEN W = 3
IF K$ = "A" THEN W = 4
IF K$ = CHR$(0) + "K" THEN X = X - 12
IF K$ = CHR$(0) + "M" THEN X = X + 12
IF K$ = CHR$(0) + "H" THEN Y = Y - 12
IF K$ = CHR$(0) + "P" THEN Y = Y + 12
IF K$ = CHR$(32) THEN
R = R + 1
IF R <= 300 THEN
P(R) = 1
R(R) = Q
G(R) = B
T(R) = B(W)
N(R) = A(W)
END IF
END IF
RETURN
SUB htu (b1, b2, b3, b4)
LINE (b1, b2)-(b3, b4), 6, BF
LINE (b1 + 1, b2 + 1)-(b3 - 1, b4 - 1), 7, B
END SUB
是一段坦克程序
为什么输出会闪动,谁能解决!!!!
最好改一下!