呵呵怀念DOS时代的编程哦呵呵呵呵呵呵发上我一份6年前的BASIC程序,QB运行
排雷用NUMLOCK小键盘,呵呵都是语句画的图
DIM wang(1000)
SCREEN 1
LOCATE 7, 9
PRINT "1. easy"
LOCATE 9, 9
PRINT "2. hard"
LOCATE 11, 9
PRINT "3. hardest"
PRINT
PRINT
PRINT
f: LOCATE 15, 9
INPUT "please input a number"; ht
IF ht = 1 THEN ban = 10: GOTO gY
IF ht = 2 THEN ban = 18: GOTO gY
IF ht = 3 THEN ban = 27: GOTO gY
LINE (245, 110)-(290, 124), 0, BF
GOTO f
gY: CLS
LINE (42, 40)-(237, 110), 2, B
LOCATE 7, 10
PRINT "This program made in "
LOCATE 8, 7
PRINT "Jiang You ."
LOCATE 10, 7
PRINT " Progrmer Wang Yue "
LOCATE 12, 22
PRINT "1996-7-4"
GET (40, 40)-(250, 110), wang
CLS
CM = 1
AE = 1
my = 0
mx = 1
MW = 16
w = me4
DIM mb(910)
DIM me1(80)
DIM me2(80)
DIM me3(80)
DIM me4(80)
DIM me5(80)
DIM me6(80)
DIM me7(80)
DIM me8(80)
LINE (5, 7)-(197, 17), 1, B
LINE (5, 20)-(197, 80), 1, B
LINE (96.5 + 2.5, 20)-(96.5 + 2.5, 80), 1
LOCATE 2, 11
PRINT "MENU"
LOCATE 5, 3
PRINT "New"
GET (8, 29)-(96, 41), me1
LOCATE 7, 3
PRINT "Exit"
GET (8, 29 + 16)-(96, 41 + 16), me2
LOCATE 9, 3
PRINT "Display"
GET (8, 29 + 32)-(96, 41 + 32), me3
LOCATE 5, 15
PRINT "Time off"
GET (102, 29)-(194, 41), me4
LOCATE 5, 15
PRINT "Time on "
GET (102, 29)-(194, 41), me8
LOCATE 7, 15
PRINT "About"
GET (102, 29 + 16)-(194, 41 + 16), me5
LOCATE 9, 15
PRINT "Back"
GET (102, 29 + 32)-(194, 41 + 32), me6
LINE (8, 29 + 100)-(96, 41 + 100), 3, BF
GET (8, 29 + 100)-(96, 41 + 100), me7
LINE (8, 29 + 100)-(96, 41 + 100), 0, BF
GET (5, 7)-(197, 80), mb
CLS
LOCATE 10, 30
fen = 10
PRINT fen
DIM big(2475)
DIM P1(32)
DIM P2(32)
DIM P3(32)
DIM p4(32)
DIM P5(32)
DIM P6(32)
DIM P7(32)
DIM P8(32)
DIM Pp4(32)
DIM Pp5(32)
DIM Pp6(32)
DIM Pp7(32)
DIM Pp8(32)
GOTO 2
1 CIRCLE (135, 70), 40, 1, , , 1
PAINT (135, 70), 2, 1
LINE (0, 63)-(300, 63), 3
LINE (0, 77)-(300, 77), 3
LINE (128, 0)-(128, 200), 3
LINE (142, 0)-(142, 200), 3
LINE (135, 0)-(135, 200), 3
LINE (0, 70)-(300, 70), 3
LINE (128, 31)-(135, 1), 1
LINE (135, 1)-(142, 31), 1
LINE (128, 110)-(135, 130), 1
GOTO 1
2 DIM gx(10, 10)
DIM ox(10, 10)
LINE (24, 145)-(44, 165), 3, B
GET (24, 145)-(44, 165), P7
LOCATE 20, 5
PRINT "1"
LINE (24, 145)-(44, 165), 3, B
GET (24, 145)-(44, 165), P1
LOCATE 20, 5
PRINT "2"
LINE (24, 145)-(44, 165), 3, B
GET (24, 145)-(44, 165), P2
LOCATE 20, 5
PRINT "3"
LINE (24, 145)-(44, 165), 3, B
GET (24, 145)-(44, 165), P3
LOCATE 20, 5
PRINT "4"
LINE (24, 145)-(44, 165), 3, B
GET (24, 145)-(44, 165), Pp4
LOCATE 20, 5
PRINT "5"
LINE (24, 145)-(44, 165), 3, B
GET (24, 145)-(44, 165), Pp5
LOCATE 20, 5
PRINT "6"
LINE (24, 145)-(44, 165), 3, B
GET (24, 145)-(44, 165), Pp6
LOCATE 20, 5
PRINT "7"
LINE (24, 145)-(44, 165), 3, B
GET (24, 145)-(44, 165), Pp7
LOCATE 20, 5
PRINT "8"
LINE (24, 145)-(44, 165), 3, B
GET (24, 145)-(44, 165), Pp8
LINE (24, 145)-(44, 165), 3, BF
GET (24, 145)-(44, 165), p4
LINE (24, 145)-(44, 165), 0, BF
LINE (24, 145)-(44, 165), 3, B
LINE (25, 146)-(43, 164), 1
LINE (25, 164)-(43, 146), 1
GET (24, 145)-(44, 165), P8
LINE (24, 145)-(44, 165), 0, BF
LINE (24, 145)-(44, 165), 3, B
CIRCLE (34, 155), 4, 2, , , 1
LINE (34, 147)-(34, 163), 2
LINE (26, 155)-(42, 155), 2
LINE (28, 149)-(40, 161), 2
LINE (40, 149)-(28, 161), 2
GET (24, 145)-(44, 165), P5
LINE (24, 145)-(44, 165), 0, BF
LINE (24, 145)-(44, 165), 3, B
CIRCLE (30, 149), 1, 1, , , 1
LINE (30, 151)-(30, 163), 3
LINE (31, 157)-(41, 157), 2
LINE (41, 157)-(31, 150), 2
LINE (31, 150)-(31, 157), 2
PAINT (35, 154), 2, 2
GET (24, 145)-(44, 165), P6
LINE (24, 145)-(44, 165), 0, BF
v1 = 22
FOR Y1 = 0 TO 176 STEP 22
FOR X1 = 0 TO 176 STEP 22
PUT (X1, Y1), p4
NEXT X1
NEXT Y1
LINE (X1 - v1 - 1, Y1 - v1 - 1)-(X1 - v1 + 21, Y1 - v1 + 21), 1, B
GOTO rp1
rp1:
RANDOMIZE TIMER
FOR a3 = 1 TO ban
FOR y = 0 TO 3
ro2 = INT(RND(10) * 9 + 1)
ro1 = INT(RND(10) * 9 + 1)
NEXT y
gx(ro1, ro2) = 1
NEXT a3
GOTO m:
rp2:
FOR a3 = 1 TO 9
RANDOMIZE TIMER
ro1 = INT(RND(1) * 9 + 1)
ro2 = INT(RND(1) * 9 + 1)
gx(ro1, a3) = 1
NEXT a3
m:
ex = 9: ey = 9
scan:
IF CM = 1 THEN : LOCATE 5, 30: PRINT TIME$
LINE (X1 - v1 - 1, Y1 - v1 - 1)-(X1 - v1 + 21, Y1 - v1 + 21), 1, B
r$ = INKEY$
LINE (0, 0)-(197, 197), 2, B
IF r$ = "4" THEN GOSUB 500: X1 = X1 - 22: ex = ex - 1: IF X1 = 0 THEN X1 = 22: ex = 1
IF r$ = "2" THEN GOSUB 500: Y1 = Y1 + 22: ey = ey + 1: IF Y1 = 220 THEN Y1 = 198: ey = 9
IF r$ = "8" THEN GOSUB 500: Y1 = Y1 - 22: ey = ey - 1: IF Y1 = 0 THEN Y1 = 22: ey = 1
IF r$ = "6" THEN GOSUB 500: X1 = X1 + 22: ex = ex + 1: IF X1 = 220 THEN X1 = 198: ex = 9
IF r$ = CHR$(13) THEN GOTO 1000
IF r$ = "5" THEN 700
IF r$ = CHR$(27) THEN GET (0, 0)-(197, 197), big: GOTO menu
GOTO scan
bad:
fen = fen - 1
LOCATE 10, 30
PRINT fen
PUT (X1 - v1, Y1 - v1), P8, PSET
ox(ex, ey) = 1: PIN = PIN + 1
bin = 1
GOSUB 710
bin = 0
PLAY "o3e23d23c23"
GOTO scan
500 LINE (X1 - v1 - 1, Y1 - v1 - 1)-(X1 - v1 + 21, Y1 - v1 + 21), 0, B
RETURN
600 FOR A5 = 1 TO 9
FOR A4 = 1 TO 9
gx(A4, A5) = 0
NEXT A4
NEXT A5
700 IF ox(ex, ey) = 1 THEN GOTO scan
IF gx(ex, ey) = 1 THEN PUT (X1 - v1, Y1 - v1), P5, PSET: ox(ex, ey) = 1: PIN = PIN + 1: fen = fen - 1: LOCATE 10, 30: PRINT fen: PLAY "o3e23d23c23": GOTO scan
710 ox(ex, ey) = 1: PIN = PIN + 1
IF gx(ex + 1, ey) = 1 THEN boom = boom + 1
IF gx(ex - 1, ey) = 1 THEN boom = boom + 1
IF gx(ex, ey + 1) = 1 THEN boom = boom + 1
IF gx(ex, ey - 1) = 1 THEN boom = boom + 1
IF gx(ex + 1, ey + 1) = 1 THEN boom = boom + 1
IF gx(ex - 1, ey - 1) = 1 THEN boom = boom + 1
IF gx(ex + 1, ey - 1) = 1 THEN boom = boom + 1
IF gx(ex - 1, ey + 1) = 1 THEN boom = boom + 1
IF bin = 1 THEN 800
IF boom = 1 THEN PUT (X1 - v1, Y1 - v1), P1, PSET
IF boom = 2 THEN PUT (X1 - v1, Y1 - v1), P2, PSET
IF boom = 3 THEN PUT (X1 - v1, Y1 - v1), P3, PSET
IF boom = 3 THEN PUT (X1 - v1, Y1 - v1), P3, PSET
IF boom = 4 THEN PUT (X1 - v1, Y1 - v1), Pp4, PSET
IF boom = 5 THEN PUT (X1 - v1, Y1 - v1), Pp5, PSET
IF boom = 6 THEN PUT (X1 - v1, Y1 - v1), Pp6, PSET
IF boom = 7 THEN PUT (X1 - v1, Y1 - v1), Pp7, PSET
IF boom = 8 THEN PUT (X1 - v1, Y1 - v1), Pp8, PSET
IF boom = 0 THEN PUT (X1 - v1, Y1 - v1), P7, PSET
boom = 0
xo(ex, ey) = 1
GOTO scan
800 IF boom = 1 THEN PUT (X1 - v1, Y1 - v1), P1, OR
IF boom = 2 THEN PUT (X1 - v1, Y1 - v1), P2, OR
IF boom = 3 THEN PUT (X1 - v1, Y1 - v1), P3, OR
IF boom = 3 THEN PUT (X1 - v1, Y1 - v1), P3, OR
IF boom = 4 THEN PUT (X1 - v1, Y1 - v1), Pp4, OR
IF boom = 5 THEN PUT (X1 - v1, Y1 - v1), Pp5, OR
IF boom = 6 THEN PUT (X1 - v1, Y1 - v1), Pp6, OR
IF boom = 7 THEN PUT (X1 - v1, Y1 - v1), Pp7, OR
IF boom = 8 THEN PUT (X1 - v1, Y1 - v1), Pp8, OR
IF boom = 0 THEN PUT (X1 - v1, Y1 - v1), P7, OR
boom = 0
RETURN
1000 IF ox(ex, ey) = 1 THEN GOTO scan
IF gx(ex, ey) = 1 THEN fen = fen + 1 ELSE GOTO bad
LOCATE 10, 30
PRINT fen
PUT (X1 - v1, Y1 - v1), P6, PSET
ox(ex, ey) = 1: PIN = PIN + 1
PLAY "o4e15c15e15g15"
GOTO scan
2000 CLS
LOCATE 10, 12
PRINT "GAME OVER"
2001
r$ = INKEY$
IF r$ <> "" THEN END
GOTO 2001
menu:
LINE (18, 0)-(197, 6), 0, BF
LINE (197, 0)-(202, 30), 0, BF
mx = 1: my = 1
PUT (5, 7), mb, PSET
SCAN2:
IF CM = 1 THEN LOCATE 5, 30: PRINT TIME$
k$ = INKEY$
IF k$ = "2" THEN my = my + 1: GOTO JUGE
IF k$ = "8" THEN my = my - 1: GOTO JUGE
IF k$ = "4" THEN mx = mx - 1: GOTO JUGE
IF k$ = "6" THEN mx = mx + 1: GOTO JUGE
IF k$ = "5" OR k$ = CHR$(13) THEN GOTO RUN1
IF k$ = CHR$(27) THEN PUT (0, 0), big, PSET: GOTO scan
GOTO SCAN2
JUGE:
IF mx = 3 THEN mx = 2: GOTO SCAN2
IF mx = 0 THEN mx = 1: GOTO SCAN2
IF my <= 0 THEN my = 1: GOTO SCAN2
IF my >= 4 THEN my = 3: GOTO SCAN2
IF mx = 1 AND my = 1 THEN PUT (8, 29), me7, XOR: GOTO n1
IF mx = 1 AND my = 2 THEN PUT (8, 29 + 16), me7, XOR: GOTO n1
IF mx = 1 AND my = 3 THEN PUT (8, 29 + 32), me7, XOR: GOTO n1
IF mx = 2 AND my = 1 THEN PUT (102, 29), me7, XOR: GOTO n1
IF mx = 2 AND my = 2 THEN PUT (102, 29 + 16), me7, XOR: GOTO n1
IF mx = 2 AND my = 3 THEN PUT (102, 29 + 32), me7, XOR: GOTO n1
GOTO SCAN2
n1:
IF mx <> 1 OR my <> 1 THEN PUT (8, 29), me1, PSET
IF mx <> 1 OR my <> 2 THEN PUT (8, 29 + 16), me2, PSET
IF mx <> 1 OR my <> 3 THEN PUT (8, 29 + 32), me3, PSET
IF mx <> 2 OR my <> 1 THEN GOTO t4
g1: IF mx <> 2 OR my <> 2 THEN PUT (102, 29 + 16), me5, PSET
IF mx <> 2 OR my <> 3 THEN PUT (102, 29 + 32), me6, PSET
GOTO SCAN2
RUN1:
IF mx = 1 AND my = 1 THEN RUN
IF mx = 1 AND my = 2 THEN 2000
IF mx = 1 AND my = 3 THEN cl = cl + 1: GOTO w3
IF mx = 2 AND my = 1 THEN CM = CM + 1: GOTO w4
IF mx = 2 AND my = 2 THEN PUT (0, 80), wang, PSET
IF mx = 2 AND my = 3 THEN PUT (0, 0), big, PSET: GOTO scan
GOTO SCAN2
w3:
IF cl = 3 THEN cl = 1
COLOR 0, cl
GOTO SCAN2
w4:
AE = AE + 1
IF AE = 2 THEN AE = 0: PUT (102, 29), me4, PSET ELSE PUT (102, 29), me8, PSET
IF CM = 2 THEN CM = 0
IF CM = 0 THEN LINE (230, 30)-(296, 40), 0, BF: GOTO SCAN2
LOCATE 5, 30
PRINT TIME$
GOTO SCAN2
t4: IF AE = 1 THEN PUT (102, 29), me8, PSET
IF AE = 0 THEN PUT (102, 29), me4, PSET
GOTO g1