回 帖 发 新 帖 刷新版面

主题:[讨论]游戏王国

谁有游戏都加分

回复列表 (共31个回复)

沙发

老兄多大了还玩游戏啊!!!!!!!

板凳

用qb编的吗?

3 楼

PRINT "猜拳游戏"
333 CLS
INPUT "How many?", cc
IF cc MOD 2 = 0 THEN 333
dd = cc \ 2 + 1
CLS
RANDOMIZE TIMER
PRINT "1:ROCK", "2:SISSOR", "3:PAPER"
DO UNTIL x = dd OR y = dd
i = INT(RND * 3)
SELECT CASE i
CASE 0
a$ = "r"
CASE 1
a$ = "s"
CASE 2
a$ = "p"
END SELECT
DO UNTIL c$ = "1" OR c$ = "2" OR c$ = "3"
c$ = INKEY$
LOOP
SELECT CASE c$
CASE "1"
b$ = "r"
CASE "2"
b$ = "s"
CASE "3"
b$ = "p"
END SELECT
c$ = ""
IF a$ = b$ THEN
PRINT "TIE",
ELSEIF a$ = "r" AND b$ = "s" THEN
PRINT "FAILED", : x = x + 1
ELSEIF a$ = "s" AND b$ = "p" THEN
PRINT "FAILED", : x = x + 1
ELSEIF a$ = "p" AND b$ = "r" THEN
PRINT "FAILED", : x = x + 1
ELSEIF (a$ = "r" AND b$ = "p") OR (a$ = "p" AND b$ = "s") OR (a$ = "s" AND b$ = "r") THEN
PRINT "WIN", : y = y + 1
END IF
IF a$ = "r" THEN
a$ = "ROCK"
ELSEIF a$ = "s" THEN
a$ = "SISSOR"
ELSE
a$ = "PAPER"
END IF
IF b$ = "r" THEN
b$ = "ROCK"
ELSEIF b$ = "s" THEN
b$ = "SISSOR"
ELSE
b$ = "PAPER"
END IF
PRINT "You:"; b$,
PRINT "Com:"; a$
LOOP
PRINT y; ":"; x
IF x = dd THEN
PRINT "You lose"
ELSEIF y = dd THEN
PRINT "You win"
END IF
PRINT TAB(30); : PRINT "Do you want to play again?"
PRINT TAB(30); : PRINT "1:YES 3:NO"
DO UNTIL g$ = "1" OR g$ = "3"
g$ = INKEY$
IF g$ = "1" THEN
g$ = "": x = 0: y = 0: GOTO 333
ELSEIF g$ = "3" THEN
END
END IF
LOOP

4 楼

石头剪子布
CLS
INPUT "end or start", x$
WHILE x$ <> "end" AND a$ <> "end"
INPUT "What are you? rock, scissors, cloth? ", a$
IF a$ = "scissors" THEN
  a = 1
END IF
IF a$ = "rock" THEN
  a = 2
END IF
IF a$ = "cloth" THEN
  a = 3
END IF
RANDOMIZE TIMER
b = INT(RND * 3) + 1
IF a = b THEN
  PRINT "Draw"
END IF
IF a = 1 AND b = 2 THEN PRINT "You lose the"
IF a = 1 AND b = 3 THEN PRINT "You win"
IF a = 2 AND b = 1 THEN PRINT "You win"
IF a = 2 AND b = 3 THEN PRINT "You lose the"
IF a = 3 AND b = 1 THEN PRINT "You lose the"
IF a = 3 AND b = 2 THEN PRINT "You win"
WEND
END

上楼的有点复杂啦

5 楼

还有一个,转自论坛某位高手
DECLARE FUNCTION MsgBox% (stil$)
DECLARE SUB GameOver ()
DECLARE SUB BlGet (e AS ANY)
DECLARE SUB BlClear ()
DECLARE SUB BlDraw ()
DECLARE SUB BlInit ()
DECLARE SUB Is.CanDown ()
DECLARE SUB Is.CanLeft ()
DECLARE SUB Is.CanRight ()
DECLARE SUB Is.CanTurnLeft ()
DECLARE SUB Is.CanTurnRight ()
DECLARE SUB MyPrn (X%, Y%, st$, bfclr%, bkclr%, over%)
DECLARE SUB Set.Palete ()
DECLARE SUB SysInit ()
DECLARE SUB Turn.Left (e AS ANY)
DECLARE SUB Turn.Right (e AS ANY)
DECLARE SUB Up.Pset (X%, Y%)
DECLARE SUB XYClear ()
DECLARE SUB XYSet ()
TYPE BlType             
     Wid AS INTEGER    
     Hei AS INTEGER     
     Bit AS STRING * 6    
END TYPE
CONST KeyLeft% = 75, KeyRight% = 77, KeyDown% = 80, KeyA% = 65
CONST KeyS% = 83, KeyEsc% = 27, KeySpace% = 32, KeyPgDn% = 81, KeyPgUp% = 73
CONST False = 0, True = NOT False  
CONST Bgnx% = 10, Bgny% = 0         
CONST BackClr% = 10                 
CONST bordx% = 60, Bordy% = 50     
CONST Pexx% = 16, Pexy% = 16       
CONST Hei% = 24, Wid% = 24          
DIM SHARED Works  AS LONG          
DIM SHARED Fast%                   
DIM SHARED BPic(32) AS LONG         
REDIM SHARED Xy(Hei%, Wid%) AS INTEGER
DIM SHARED Bl(11) AS BlType         
DIM SHARED CurBl AS BlType         
DIM SHARED NextBl AS BlType        
DIM SHARED Blx%, Bly%          
DIM SHARED Staring%           
DEFINT A-Z
SCREEN 12
Fast% = 10
SysInit
BlInit        
DEF SEG = 65
WHILE Quit% = False      
   NewTime% = PEEK(92)   
   IF OldTime% > NewTime% THEN OldTime% = 0
   IF NewTime% > OldTime%  Fast% AND Staring% THEN
       OldTime% = NewTime%
       Is.CanDown
   END IF
   ikey$ = INKEY$: KeyCode% = -1    
   IF ikey$ <> "" THEN
       IF LEN(ikey$) = 2 THEN
            KeyCode% = ASC(MID$(ikey$, 2, 1))
            ELSE : KeyCode% = ASC(UCASE$(ikey$))
       END IF
   END IF

   IF KeyCode% > 0 THEN             
       SELECT CASE KeyCode%
           CASE KeyLeft%            
                IF Staring% THEN CALL Is.CanLeft
           CASE KeyRight%           
                IF Staring% THEN CALL Is.CanRight
           CASE KeyDown%           
                IF Staring% THEN CALL Is.CanDown
           CASE KeyA%              
                IF Staring% THEN CALL Is.CanTurnLeft
           CASE KeyS%              
                IF Staring% THEN CALL Is.CanTurnRight
           CASE KeyEsc%            
                Quit% = True
           CASE KeySpace%        
                Staring% = NOT Staring%
           CASE KeyPgDn%            
                IF Fast% < 10 THEN
                   Fast% = Fast%  1
                   M$ = LTRIM$(RTRIM$(STR$(10 - Fast%)))
                   LINE (500, 390)-(520, 407), BackClr%, BF
                   MyPrn 501, 391, M$, 13, BackClr%, 0
                   MyPrn 500, 390, M$, 4, 0, 0
                END IF
           CASE KeyPgUp%          
                IF Fast% > 0 THEN
                   Fast% = Fast% - 1
                   M$ = LTRIM$(RTRIM$(STR$(10 - Fast%)))
                   LINE (500, 390)-(520, 407), BackClr%, BF
                   MyPrn 501, 391, M$, 13, BackClr%, 0
                   MyPrn 500, 390, M$, 4, 0, 0
                END IF
       END SELECT
   END IF
   '---------------------------------------

6 楼

WEND
END
DATA 0,0,0,0,0,0,0,0,0,64,0,48,0,60,63,254,0,60,0,48,0,64,0,0,0,0,0,0,0,0,0,0
DATA 0,0,0,0,0,0,0,0,1,0,6,0,30,0,63,254,30,0,6,0,1,0,0,0,0,0,0,0,0,0,0,0
DATA 0,0,0,128,0,128,0,128,0,128,0,128,0,128,0,128,0,128,4,144,3,224,3,224,1,192,1,192,0,128,0,0
DATA 17,0,17,0,17,0,35,252,34,4,100,8,168,64,32,64,33,80,33,72,34,76,36,68,32,64,32,64,33,64,32,128
DATA 1,0,17,0,17,0,17,16,31,248,33,0,65,0,1,4,255,254,1,0,2,128,2,128,4,64,8,48,16,14,96,4
DATA 4,64,126,64,68,68,84,126,84,136,85,8,84,72,84,72,84,72,84,80,84,80,16,32,40,80,36,142,69,4,130,0
DATA 0,0,127,248,0,16,0,32,0,64,1,128,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,5,0,2,0
DATA 16,64,16,32,16,0,19,254,250,2,20,68,16,64,63,254,208,136,16,136,17,8,16,144,16,96,16,80,80,140,35,4
DATA 16,32,18,32,34,32,35,36,74,172,250,112,18,32,35,252,66,32,250,112,66,172,3,36,26,32,226,36,67,254,0,0
DATA 16,64,16,80,35,248,32,64,72,64,255,252,17,36,32,168,66,32,249,36,7,254,0,64,28,96,224,144,65,12,2,4
DATA 3,248,66,8,50,8,19,248,2,8,2,8,243,252,18,8,18,208,18,32,18,144,19,12,18,4,40,0,68,6,3,252
DATA 1,0,1,0,33,8,33,8,33,8,33,8,63,248,33,8,1,0,65,4,65,4,65,4,65,4,65,4,127,252,64,4
DATA 16,16,8,24,4,32,4,72,127,252,1,0,1,0,1,4,255,254,1,0,2,128,2,128,4,64,8,48,48,14,192,4
DATA 2,0,2,32,3,240,2,0,2,0,2,4,255,254,2,0,2,0,2,128,2,96,2,48,2,16,2,0,2,0,2,0
DATA 4,0,14,4,120,254,8,132,8,132,254,132,8,132,24,132,28,252,42,132,40,0,72,136,136,196,9,6,10,2,8,0
DATA 0,128,4,128,4,64,8,64,8,32,16,16,32,8,79,238,132,36,4,32,4,32,4,32,4,32,8,32,17,64,32,128
DATA 16,0,16,0,16,4,18,126,255,68,18,68,18,68,18,68,18,68,34,68,34,68,34,68,34,68,74,124,132,68,0,0
DATA 16,128,16,128,16,128,16,136,91,252,84,136,80,136,144,136,16,136,31,254,16,128,17,64,17,32,18,16,20,14,24,4
DATA 0,16,64,24,48,20,23,254,4,16,4,16,13,208,20,20,37,212,229,84,37,84,37,88,37,208,37,42,8,70,16,130
DATA 19,248,18,8,19,248,90,8,87,248,80,4,151,254,20,164,20,164,23,252,16,0,19,248,17,16,16,224,17,24,22,6
DATA 0,4,255,254,2,0,2,0,2,0,2,128,2,64,2,48,2,16,2,0,2,0,2,0,2,0,2,0,2,0,2,0
DATA 8,32,8,36,255,254,9,32,65,248,35,16,36,160,128,64,73,176,18,14,47,252,226,8,34,8,34,8,35,248,34,8
DATA 2,0,2,0,2,4,255,254,4,0,4,0,8,0,8,8,31,252,40,8,72,8,136,8,8,8,8,8,15,248,8,8
DATA 8,64,28,64,240,252,17,132,18,72,252,48,16,96,57,160,52,62,84,66,144,196,17,36,16,24,16,48,16,192,23,0
DATA 2,0,2,0,2,8,255,252,4,0,4,0,4,0,8,16,15,248,16,128,16,128,32,128,64,128,128,132,127,254,0,0
DATA 8,32,9,168,15,36,17,32,17,36,63,254,81,32,145,32,17,164,19,24,29,16,17,48,17,72,17,138,21,6,18,2
DATA 0,4,127,254,68,68,68,68,68,68,127,252,66,4,2,0,7,240,8,16,20,32,98,192,1,0,6,0,24,0,224,0
DATA 34,8,34,28,127,96,34,64,34,64,62,64,34,126,34,72,62,72,34,72,34,72,255,72,0,136,21,8,34,8,64,8
DATA 4,0,3,0,1,0,0,4,255,254,4,0,4,16,7,248,4,16,4,16,4,16,8,16,8,16,16,16,32,160,64,64
DATA 16,128,16,128,16,128,16,136,19,252,252,136,16,136,16,136,16,136,23,254,28,128,241,64,65,32,2,16,4,14,8,4
DATA 8,64,28,64,240,64,16,64,17,68,253,76,17,80,50,64,56,64,84,160,80,160,145,16,17,8,18,14,20,4,24,0
DATA 0,16,63,248,32,16,40,80,36,80,34,144,34,144,33,16,33,16,34,144,34,144,36,80,40,80,48,18,64,10,128,6
DATA 16,12,126,240,16,128,40,132,126,254,8,144,254,144,9,16,10,16,0,16,31,248,16,16,31,240,16,16,31,240,16,16
DATA 16,128,16,72,23,252,32,0,35,248,98,8,163,248,32,0,47,254,40,2,51,244,32,64,32,64,32,64,33,64,32,128
DATA 0,8,127,252,8,32,8,32,8,32,8,32,8,36,255,254,8,32,8,32,8,32,8,32,16,32,16,32,32,32,64,32
DATA 16,64,16,64,16,64,16,128,252,136,37,4,39,254,36,2,36,4,73,254,41,4,17,4,41,4,69,4,133,252,1,4
DATA 32,128,16,132,20,254,254,128,33,0,34,254,60,34,36,36,36,160,36,168,36,188,36,160,68,160,85,96,138,38,4,28
DATA 0,0,0,0,0,0,0,0,0,0,0,0,0,4,255,254,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
'---------------------------------------------
DATA 0,0,56,108,198,198,214,214,198,198,108,56,0,0,0,0
DATA 0,0,24,56,120,24,24,24,24,24,24,126,0,0,0,0
DATA 0,0,124,198,6,12,24,48,96,192,198,254,0,0,0,0
DATA 0,0,124,198,6,6,60,6,6,6,198,124,0,0,0,0
DATA 0,0,12,28,60,108,204,254,12,12,12,30,0,0,0,0
DATA 0,0,254,192,192,192,252,6,6,6,198,124,0,0,0,0
DATA 0,0,56,96,192,192,252,198,198,198,198,124,0,0,0,0
DATA 0,0,254,198,6,6,12,24,48,48,48,48,0,0,0,0
DATA 0,0,124,198,198,198,124,198,198,198,198,124,0,0,0,0
DATA 0,0,124,198,198,198,126,6,6,6,12,120,0,0,0,0
DATA 0,0,0,0,0,0,0,0,0,24,24,24,48,0,0,0
DATA 0,0,0,0,0,126,0,0,126,0,0,0,0,0,0,0
DATA 0,0,0,0,2,6,12,24,48,96,192,128,0,0,0,0
DATA 0,0,0,0,0,0,0,0,0,0,24,24,0,0,0,0
DATA 0,0,12,24,48,48,48,48,48,48,24,12,0,0,0,0
DATA 0,0,48,24,12,12,12,12,12,12,24,48,0,0,0,0
DATA 0,0,0,0,24,24,0,0,0,24,24,0,0,0,0,0
DATA 0,0,124,198,198,96,56,12,6,198,198,124,0,0,0,0
DATA 0,0,0,0,0,220,102,102,102,102,102,124,96,96,240,0
DATA 0,0,0,0,0,120,12,124,204,204,204,118,0,0,0,0
DATA 0,0,0,0,0,124,198,192,192,192,198,124,0,0,0,0
DATA 0,0,0,0,0,124,198,254,192,192,198,124,0,0,0,0
DATA 0,0,254,102,98,104,120,104,96,98,102,254,0,0,0,0
DATA 0,0,0,0,0,124,198,96,56,12,198,124,0,0,0,0
DATA 0,0,252,102,102,102,124,96,96,96,96,240,0,0,0,0
DATA 0,0,0,0,0,118,204,204,204,204,204,124,12,204,120,0
DATA 0,0,198,198,198,198,198,198,198,198,198,124,0,0,0,0
DATA 0,0,248,108,102,102,102,102,102,102,108,248,0,0,0,0
DATA 0,0,0,0,0,220,102,102,102,102,102,102,0,0,0,0
DATA 0,0,60,102,194,192,192,192,192,194,102,60,0,0,0,0
DATA 0,0,0,0,0,124,198,198,198,198,198,124,0,0,0,0
DATA 0,0,0,0,0,198,198,198,198,198,198,126,6,12,248,0
DATA 0,0,252,102,102,102,124,108,102,102,102,230,0,0,0,0
DATA 0,0,24,24,0,56,24,24,24,24,24,60,0,0,0,0
DATA 0,0,224,96,96,108,118,102,102,102,102,230,0,0,0,0
DATA 0,0,16,48,48,252,48,48,48,48,54,28,0,0,0,0
DATA 0,0,16,56,108,198,198,254,198,198,198,198,0,0,0,0
DATA 0,0,198,198,198,198,198,198,198,108,56,16,0,0,0,0

7 楼


SUB BlClear

    N% = 1
    FOR Y% = 0 TO CurBl.Hei - 1
        FOR X% = 0 TO CurBl.Wid - 1
            IF MID$(CurBl.Bit, N%, 1) = "1" THEN
               Rx% = (X%  Blx%) * Pexx%  bordx%
               Ry% = (Y%  Bly%) * Pexy%  Bordy%
               LINE (Rx%, Ry%)-(Rx%  15, Ry%  15), 0, BF
            END IF
            N% = N%  1
        NEXT
    NEXT
END SUB

SUB BlDraw

    N% = 1
    FOR Y% = 0 TO CurBl.Hei - 1
        FOR X% = 0 TO CurBl.Wid - 1
            IF MID$(CurBl.Bit, N%, 1) = "1" THEN
                Ry% = (Bly%  Y%) * Pexx%  Bordy%
                Rx% = (Blx%  X%) * Pexy%  bordx%
                PUT (Rx%, Ry%), BPic, PSET
            END IF
            N% = N%  1
        NEXT
    NEXT
END SUB

SUB BlGet (e AS BlType)

    RANDOMIZE TIMER
    N% = INT(RND * 11)
    e = Bl(N%)
    N% = INT(RND * 4)
    FOR i% = 1 TO N%: Turn.Left e: NEXT
END SUB

SUB BlInit
    IF NextBl.Wid = 0 THEN
           BlGet NextBl
           BlGet CurBl
        ELSE
           CurBl = NextBl
           BlGet NextBl
    END IF

    Blx% = Bgnx%: Bly% = Bgny%
    CALL BlDraw
    
    LINE (460, 70)-(524, 134), BackClr%, BF
    N% = 1
    FOR Y% = 0 TO NextBl.Hei - 1
        FOR X% = 0 TO NextBl.Wid - 1
            IF MID$(NextBl.Bit, N%, 1) = "1" THEN
                PUT (X% * Pexx%  461, Y% * Pexy%  70), BPic, PSET
            END IF
            N% = N%  1
        NEXT
    NEXT
END SUB

SUB GameOver
    M% = MsgBox
    IF M% THEN
        REDIM Xy(Hei%, Wid%)  AS INTEGER
        Fast% = 10: NextBl.Wid = 0
        LINE (bordx%, Bordy%)-(bordx%  Wid% * Pexx%, Bordy%  Hei% * Pexy%), 0, BF
        M$ = LTRIM$(RTRIM$(STR$(10 - Fast%)))
        LINE (500, 390)-(520, 407), BackClr%, BF
        MyPrn 501, 391, M$, 13, BackClr%, 0
        MyPrn 500, 390, M$, 4, 0, 0
        Works& = 0
        M$ = LTRIM$(RTRIM$(STR$(Works&)))
        LINE (500, 360)-(550, 377), BackClr%, BF
        MyPrn 501, 361, M$, 13, BackClr%, 0
        MyPrn 500, 360, M$, 4, 0, 0
        Staring% = -1
        CALL BlInit
    ELSE
        END
    END IF
END SUB



8 楼

SUB Is.CanDown

    IF Bly%  CurBl.Hei > Hei% - 1 THEN 
       CALL XYSet
       CALL XYClear
       CALL BlInit
       EXIT SUB
    END IF
    N% = 1
    FOR Y% = 0 TO CurBl.Hei - 1       
        FOR X% = 0 TO CurBl.Wid - 1
            IF Xy(X%  Blx%, Bly%  Y%  1) AND MID$(CurBl.Bit, N%, 1) = "1" THEN
                IF Bly% = 0 THEN
                    CALL GameOver
                    EXIT SUB
                END IF
                CALL XYSet
                CALL XYClear
                CALL BlInit
                EXIT SUB
            END IF
            N% = N%  1
        NEXT
    NEXT
    
    CALL BlClear
    Bly% = Bly%  1
    CALL BlDraw
END SUB

SUB Is.CanLeft
   IF Blx% = 0 THEN EXIT SUB    
   N% = 1
   FOR Y% = 0 TO CurBl.Hei - 1  
       FOR X% = 0 TO CurBl.Wid - 1
           IF Xy(Blx%  X% - 1, Bly%  Y%) AND MID$(CurBl.Bit, N%, 1) = "1" THEN
              EXIT SUB
           END IF
           N% = N%  1
       NEXT
   NEXT
   CALL BlClear
   Blx% = Blx% - 1
   CALL BlDraw
END SUB

SUB Is.CanRight

   IF Blx%  CurBl.Wid > Wid% - 1 THEN EXIT SUB 
   N% = 1
   FOR Y% = 0 TO CurBl.Hei - 1                  
       FOR X% = 0 TO CurBl.Wid - 1
           IF Xy(Blx%  X%  1, Bly%  Y%) AND MID$(CurBl.Bit, N%, 1) = "1" THEN
               EXIT SUB
           END IF
           N% = N%  1
       NEXT
   NEXT

   CALL BlClear
   Blx% = Blx%  1
   CALL BlDraw
END SUB

9 楼

SUB Is.CanTurnLeft

    Turn.Left CurBl           
   
    IF CurBl.Hei  Bly% > Hei% THEN : Turn.Right CurBl: EXIT SUB
    IF CurBl.Wid  Blx% > Wid% THEN : Turn.Right CurBl: EXIT SUB
    N% = 1
    FOR Y% = 0 TO CurBl.Hei - 1  
        FOR X% = 0 TO CurBl.Wid - 1
            IF MID$(CurBl.Bit, N%, 1) = "1" AND Xy(Blx%  X%, Bly%  Y) THEN
                Turn.Right CurBl   
                EXIT SUB
            END IF
            N% = N%  1
        NEXT
    NEXT
    
    Turn.Right CurBl
    CALL BlClear
    Turn.Left CurBl
    CALL BlDraw
END SUB

10 楼

UB Is.CanTurnRight

    Turn.Right CurBl          
    IF CurBl.Hei  Bly% > Hei%  THEN : Turn.Left CurBl: EXIT SUB
    IF CurBl.Wid  Blx% > Wid%  THEN : Turn.Left CurBl: EXIT SUB
    N% = 1
    FOR Y% = 0 TO CurBl.Hei - 1    
        FOR X% = 0 TO CurBl.Wid - 1
            IF MID$(CurBl.Bit, N%, 1) = "1" AND Xy(Blx%  X%, Bly%  Y) THEN
                Turn.Left CurBl    
                EXIT SUB
            END IF
            N% = N%  1
        NEXT
    NEXT
   
    Turn.Left CurBl
    CALL BlClear
    Turn.Right CurBl
    CALL BlDraw
END SUB

FUNCTION MsgBox (stil$)
    N% = LEN(stil$) * 8
    LINE (bordx%  100, 220)-(bordx%  N%  116, 244), 14, B
    PAINT (bordx%  102, 222), 9, 14
    MyPrn bordx%  108, 224, stil$, 15, 0, 0
    WHILE Quit% = 0
          ikey$ = INKEY$
          IF ikey$ = CHR$(27) THEN EXIT FUNCTION
          IF ikey$ = CHR$(32) THEN MsgBox = -1: EXIT FUNCTION
    WEND
END FUNCTION

SUB MyPrn (X%, Y%, st$, bfclr%, bkclr%, over%)
    CONST Hz$ = "→←↓OVEROJXJSGKJFJKJMXLYYZELSFKQFZTKSXY"
    CONST Dig$ = "0123456789,=/.():SpaceEsPgUDnCoyRihtAV"
    STATIC Digs() AS INTEGER, Hzs() AS INTEGER
    '76.37
    IF LEN(st$) = 0 THEN EXIT SUB
    Slen% = LEN(st$)
    IF over% <> 0 THEN LINE (X%, Y%)-(X%  Slen% * 8, Y%  16), bkclr%, BF

    STATIC Lc%
    IF Lc% = 0 THEN
         N% = LEN(Hz$) / 2: M% = LEN(Dig$): Lc% = 1
         REDIM Hzs(N%, 32) AS INTEGER, Digs(M%, 16) AS INTEGER
         FOR i% = 0 TO N% - 1
             FOR J% = 0 TO 31: READ Hzs(i%, J%): NEXT
         NEXT
         FOR i% = 0 TO M% - 1
             FOR J% = 0 TO 15: READ Digs(i%, J%): NEXT
         NEXT
    END IF
    '************************************************************************
    Rx% = X%: N% = 1
    WHILE N% <= Slen%
         B$ = MID$(st$, N%, 1)
         Byte% = ASC(B$)
         IF Byte% < 161 AND Byte% > 32 THEN
              Nober% = INSTR(Dig$, B$) - 1
              FOR i% = 0 TO 15
                     LINE (Rx%, Y%  i%)-(Rx%  7, Y%  i%), bfclr%, B, Digs(Nober%, i%)
              NEXT
         END IF
        
         IF Byte% >= 161 AND N% <> Slen% THEN
              T$ = MID$(st$, N%, 2)
              Nober% = (INSTR(Hz$, T$) - 1) / 2
              FOR i% = 0 TO 15
                       LINE (Rx%, Y%  i%)-(Rx%  7, Y%  i%), bfclr%, B, Hzs(Nober%, i% * 2)
                       LINE (Rx%  8, Y%  i%)-(Rx%  15, Y%  i%), bfclr%, B, Hzs(Nober%, i% * 2  1)
              NEXT
              N% = N%  1: Rx% = Rx%  8
         END IF
         N% = N%  1: Rx% = Rx%  8
    WEND
END SUB

我来回复

您尚未登录,请登录后再回复。点此登录或注册