'[--------------- PRODUCT OF THE NEW MAVERICK PROGRAMMING ---------------]
' [....................... TRYTOO, VERSION 2.93 ........................]
'     [............... *NOT RECOMMENDED FOR WINDOWS* ...............]

' Requirements:
'  1. 10k free memory (WOW, that's a lot!)
'  2. VGA adapter (SCREEN 12)
'  3. A lot of free time
'  4. Mouse is optional for 1 player game

' Directions (one player):
'  1. Make THREE in a row (vertically or horizontally) of the same color
'     for a match.
'  2. Get EXACTLY THREE (not 4 or 5) matches in the bottom zone to advance
'     to next level.
'  3. Use left and right arrow keys OR hold mouse left & right buttons.
'  4. Green Bonus block: GOOD & BAD!
'     a. Destroys surrounding blocks in top zone (PROBABLY good)
'     b. Changes all the block colors in the bottom zone (PROBABLY bad)

'*NOTES*
' 1. Speed increases with level.
' 2. "Fall lines": every time you reach this number of matches,
'    the floor of one column drops out and the first 3 rows fall
'    into bottom zone.
' 3. Total matches are displayed on the left in KILLED. *When 2
'    kill columns are filled, you're score increases by A LOT!
' 4. Green blocks are less common than red blocks, which are less common
'    than blue blocks, which are less common than purple blocks.  This
'    is important to know, because a RED match gives a better score than
'    a BLUE or PURPLE match...get it?
' 5. At random times, blocks of one color will disappear as a bonus.
' 6. For a more challenging game, change the SPD and/or FLL variables.

' Directions (two players):
'  1. Make THREE in a row (vertically or horizontally) of the same color
'     for a match.
'  2. Get as many matches in the bottom zone as possible.
'  3. Player one: Use left and right arrow keys.
'     Player two: Use Q and W keys.
'     * Mouse not usable.
'  4. Green Bonus block: is present!
'  5. Player 1 & Player 2 vs. Computer

' *NOTES*
'  1. Players get same blocks at same time.
'  2. If one player's block stops falling in row 4, the other's block will
'     also stop falling and hang in mid-air.  This adds some challenge and
'     players must COOPERATE for a better place on MATCH-UPS list.
'  3. TIME LIMIT: 400 sec. to get as many matches as possible in either zone.
'  4. SCORING:
'       a. bottom matches: 10000 ea.
'       b. top matches: 4000 ea.
'       c. bottom blocks left over: 300 ea.
'       d. top blocks left over: -20 ea.
'       e. minus (time left over / 10)

' Look for TRYTRYTRY, coming sooner or later...

' Player 1 code is almost all original.  I was able to modify it, though
' for the two player code.  It got much shorter and efficient, at the least.
' * Press P to pause 1 player game.  Hit enter to unpause.  There are codes
' to get to different leVel, but the cheater's name will be 'ed in the HIGH
' MATCHES list.

' I'll shut up now, enjoy...            MIKE HULME, MP.

DECLARE SUB Credits () : DECLARE SUB MavInc () : DECLARE SUB Relief (Z, qqq)
DECLARE SUB HighScore () : DECLARE SUB Ok3 () : DECLARE SUB Strt ()
DECLARE SUB ZeroPoss () : DECLARE SUB Plcheck () : DECLARE SUB Arena ()
DECLARE SUB TryBkdrop () : DECLARE SUB Arena2 () : DECLARE SUB PLQW ()
DECLARE SUB TwoPlayer () : DECLARE SUB Green2 () : DECLARE SUB ScoreAdd ()
DECLARE SUB Winner () : DECLARE SUB Super2 () : DECLARE SUB Timing ()
DECLARE SUB Bonus (A!) : DECLARE SUB VSMatches () : DECLARE SUB Ok2 ()
DECLARE SUB MouseHide () : DECLARE SUB MouseStatus (LB%, RB%, XM%, YM%)
DECLARE SUB MouseDriver (ax%, BX%, cx%, dx%) : DECLARE FUNCTION MouseInit% ()
DIM SHARED B1%(70), B2%(70), B3%(70), B4%(70)
DIM SHARED P(12, 11), L(12, 11)
DIM SHARED Q(12, 11), W(12, 11)
DIM SHARED TMth, Scr, BM, Lvl, Spd, FlL, Mth, Plyr
DIM SHARED TMth2, Scr2, BM2, TIM, TIM2, Tim3, Mth2
DIM SHARED X, Y, X2, Y2, Cod
DIM SHARED Drop%(1000), Spr%(1000)
DIM SHARED Drop2%(1000), Spr2%(1000)
DIM SHARED MOUSE$
MOUSE$ = SPACE$(57)
FOR I% = 1 TO 57
  READ A$
  H$ = CHR$(VAL("&H" + A$))
  MID$(MOUSE$, I%, 1) = H$
NEXT I%
DATA 55,89,E5,8B,5E,0C,8B,07,50,8B,5E,0A,8B,07,50,8B
DATA 5E,08,8B,0F,8B,5E,06,8B,17,5B,58,1E,07,CD,33,53
DATA 8B,5E,0C,89,07,58,8B,5E,0A,89,07,8B,5E,08,89,0F
DATA 8B,5E,06,89,17,5D,CA,08,00
CLS
ms% = MouseInit%
IF NOT ms% THEN
  PRINT "Mouse not found"
  END
END IF
MavInc
SCREEN 12: CLS : WIDTH 80, 30
PALETTE 14, 0
Blocks:
LINE (0, 0)-(15, 15), 14, BF: LINE (1, 1)-(14, 14), 13, BF
LINE (1, 14)-(14, 1), 5: LINE (1, 14)-(14, 14), 5: LINE (14, 1)-(14, 14), 5
PAINT (12, 12), 5, 5: LINE (1, 1)-(14, 14), 13, B: GET (0, 0)-(15, 15), B1%
LINE (0, 0)-(15, 15), 14, BF: LINE (1, 1)-(14, 14), 9, BF
LINE (1, 14)-(14, 1), 1: LINE (1, 14)-(14, 14), 1: LINE (14, 1)-(14, 14), 1
PAINT (12, 12), 1, 1: LINE (1, 1)-(14, 14), 9, B: GET (0, 0)-(15, 15), B2%
LINE (0, 0)-(15, 15), 14, BF: LINE (1, 1)-(14, 14), 12, BF
LINE (1, 14)-(14, 1), 4: LINE (1, 14)-(14, 14), 4: LINE (14, 1)-(14, 14), 4
PAINT (12, 12), 4, 4: LINE (1, 1)-(14, 14), 12, B: GET (0, 0)-(15, 15), B3%
LINE (0, 0)-(15, 15), 14, BF: LINE (1, 1)-(14, 14), 10, BF
LINE (3, 3)-(12, 12), 2, BF: LINE (7, 7)-(8, 8), 3, BF
LINE (6, 6)-(9, 9), 10, B: GET (0, 0)-(15, 15), B4%

Spd = 10: TMth = 0: Cod = 0
PRY = 85: BLE = 85: RED = 85: PRX = 2: BLX = 32: RDX = 62
TryBkdrop
DO
LOCATE 15, 30: PRINT " One player or two? "
SELECT CASE INKEY$
CASE "1"
  LOCATE 1, 2: PRINT "                  ": Plyr = 1: CALL TryBkdrop: EXIT DO
CASE "2"
  LOCATE 1, 2: PRINT "                  ": Plyr = 2: CALL TryBkdrop: CALL TwoPlayer: GOTO 2345
END SELECT
LOOP

4 LINE (100, 60)-(280, 400), 0, BF: LINE (0, 0)-(639, 59), 0, BF
CALL Arena: RANDOMIZE TIMER: CALL ZeroPoss
R = INT(RND * 3) + 1: Y = 48: X = 190: Spd = Spd - 1: Lvl = Lvl + 1: FlL = INT(RND * 0) + 1: BM = 0
CALL Strt

COLOR 15: LOCATE 1, 1: PRINT "Press SPACEBAR to start level"; Lvl; "...       ": BEEP: SLEEP: TIMER ON: TIM1 = TIMER
LOCATE 1, 1: PRINT "                                                   "
MouseHide
3 DO
KP$ = INKEY$
MouseStatus LB%, RB%, XM%, YM%
IF LB% = -1 THEN
  C = (X - 100) / 15 - 1: D = (Y - 48) / 15
  IF C = -1 THEN C = 0
  IF P(C, D) = 1 THEN GOTO 3
  IF P(C, D) = 2 THEN GOTO 3
  IF P(C, D) = 3 THEN GOTO 3
  LINE (X, Y)-(X + 15, Y + 15), 0, BF: IF X > 100 THEN X = X - 15
  GOTO 109
END IF
IF RB% = -1 THEN
  C = (X - 100) / 15 + 1: D = (Y - 48) / 15
  IF D = 12 THEN D = 11
  IF P(C, D) = 1 THEN GOTO 3
  IF P(C, D) = 2 THEN GOTO 3
  IF P(C, D) = 3 THEN GOTO 3
  LINE (X, Y)-(X + 15, Y + 15), 0, BF: IF X < 265 THEN X = X + 15
  GOTO 109
END IF
1 SELECT CASE KP$
 CASE CHR$(0) + CHR$(75)
  C = (X - 100) / 15 - 1: D = (Y - 48) / 15
  IF C = -1 THEN C = 0
  IF P(C, D) = 1 THEN GOTO 3
  IF P(C, D) = 2 THEN GOTO 3
  IF P(C, D) = 3 THEN GOTO 3
  LINE (X, Y)-(X + 15, Y + 15), 0, BF: IF X > 100 THEN X = X - 15
 CASE CHR$(0) + CHR$(77)
  C = (X - 100) / 15 + 1: D = (Y - 48) / 15
  IF D = 12 THEN D = 11
  IF P(C, D) = 1 THEN GOTO 3
  IF P(C, D) = 2 THEN GOTO 3
  IF P(C, D) = 3 THEN GOTO 3
  LINE (X, Y)-(X + 15, Y + 15), 0, BF: IF X < 265 THEN X = X + 15
 CASE "P", "p"
  TIMER STOP: LOCATE 2, 21: PRINT "PAUSED!": GOSUB PauseIt: LOCATE 2, 21: PRINT "       ": TIMER ON
END SELECT
109
 IF R = 1 THEN PUT (X, Y), B1%, PSET
 IF R = 2 THEN PUT (X, Y), B2%, PSET
 IF R = 3 THEN PUT (X, Y), B3%, PSET
 IF R = 4 THEN PUT (X, Y), B4%, PSET
FOR RT = 1 TO Spd * 180: NEXT RT: LINE (X, Y)-(X + 15, Y + 15), 0, BF
IF Y < 209 THEN
 C = (X - 100) / 15: D = (Y - 48) / 15 + 1
 IF P(C, D) = 1 THEN GOTO 2
 IF P(C, D) = 2 THEN GOTO 2
 IF P(C, D) = 3 THEN GOTO 2
 Y = Y + 15: Scr = Scr + 1
 ELSE
2
 A = (X - 100) / 15: B = (Y - 48) / 15: P(A, B) = R
 IF R = 1 THEN PUT (X, Y), B1%, PSET
 IF R = 2 THEN PUT (X, Y), B2%, PSET
 IF R = 3 THEN PUT (X, Y), B3%, PSET
 IF R = 4 THEN PUT (X, Y), B4%, PSET: GOSUB Green
 Y = 48: X = 190: IF POINT(X, Y) > 0 THEN TIM = TIMER - TIM1: TIM = TIM / 60: TIMER OFF: BEEP: IF Lvl > 0 THEN CALL HighScore: GOTO 2345 ELSE SYSTEM
 R = INT(RND * 10) + 1
 IF R = 1 OR R = 2 OR R = 3 OR R = 4 THEN R = 1
 IF R = 5 OR R = 6 OR R = 7 THEN R = 2
 IF R = 8 OR R = 9 THEN R = 3
 IF R = 10 THEN R = 4
 GOSUB Ok
 END IF
IF Mth >= FlL THEN GOSUB Super
IF BM = 3 THEN TIM2 = TIMER - TIM1: TIMER OFF: LOCATE 1, 1: PRINT "  Level Completed...."; (TIM2 / 60); "minutes.": BEEP: SLEEP: GOTO 4
IF TMth = 20 THEN Relief 4, qqq
IF TMth = 30 AND qqq = 0 OR TMth = 60 AND qqq = 1 THEN Relief 1, qqq
IF TMth = 90 AND qqq = 2 OR TMth = 120 AND qqq = 3 THEN Relief 2, qqq
IF TMth = 45 THEN Relief 6, qqq
IF BM > 3 THEN Relief 5, qqq
IF TMth = 65 THEN Relief 3, qqq
LOOP

Ok:
CALL Plcheck
REDIM K(12, 11)
FOR M = 0 TO 12: FOR H = 0 TO 9
IF P(M, H) = 1 AND P(M, H + 1) = 1 AND P(M, H + 2) = 1 THEN LINE (M * 15 + 100, H * 15 + 48)-((M * 15 + 100) + 15, (H * 15 + 48) + 45), 0, BF: P(M, H) = 0: P(M, H + 1) = 0: P(M, H + 2) = 0: K(M, H) = 1: I = H: E = M: Mth = Mth + 1: TMth = TMth + 1: PRY = PRY + 15: PUT (PRX, PRY), B1%, PSET
IF P(M, H) = 2 AND P(M, H + 1) = 2 AND P(M, H + 2) = 2 THEN LINE (M * 15 + 100, H * 15 + 48)-((M * 15 + 100) + 15, (H * 15 + 48) + 45), 0, BF: P(M, H) = 0: P(M, H + 1) = 0: P(M, H + 2) = 0: K(M, H) = 1: I = H: E = M: Mth = Mth + 1: TMth = TMth + 1: BLE = BLE + 15: PUT (BLX, BLE), B2%, PSET
IF P(M, H) = 3 AND P(M, H + 1) = 3 AND P(M, H + 2) = 3 THEN LINE (M * 15 + 100, H * 15 + 48)-((M * 15 + 100) + 15, (H * 15 + 48) + 45), 0, BF: P(M, H) = 0: P(M, H + 1) = 0: P(M, H + 2) = 0: K(M, H) = 1: I = H: E = M: Mth = Mth + 1: TMth = TMth + 1: RED = RED + 15: PUT (RDX, RED), B3%, PSET
NEXT H, M
FOR M = 0 TO 10: FOR H = 0 TO 11
IF P(M, H) = 1 AND P(M + 1, H) = 1 AND P(M + 2, H) = 1 THEN LINE (M * 15 + 100, H * 15 + 48)-((M * 15 + 100) + 45, (H * 15 + 48) + 15), 0, BF: P(M, H) = 0: P(M + 1, H) = 0: P(M + 2, H) = 0: K(M, H) = 2: I = H: E = M: Mth = Mth + 1: TMth = TMth + 1: PRY = PRY + 15: PUT (PRX, PRY), B1%, PSET
IF P(M, H) = 2 AND P(M + 1, H) = 2 AND P(M + 2, H) = 2 THEN LINE (M * 15 + 100, H * 15 + 48)-((M * 15 + 100) + 45, (H * 15 + 48) + 15), 0, BF: P(M, H) = 0: P(M + 1, H) = 0: P(M + 2, H) = 0: K(M, H) = 2: I = H: E = M: Mth = Mth + 1: TMth = TMth + 1: BLE = BLE + 15: PUT (BLX, BLE), B2%, PSET
IF P(M, H) = 3 AND P(M + 1, H) = 3 AND P(M + 2, H) = 3 THEN LINE (M * 15 + 100, H * 15 + 48)-((M * 15 + 100) + 45, (H * 15 + 48) + 15), 0, BF: P(M, H) = 0: P(M + 1, H) = 0: P(M + 2, H) = 0: K(M, H) = 2: I = H: E = M: Mth = Mth + 1: TMth = TMth + 1: RED = RED + 15: PUT (RDX, RED), B3%, PSET
NEXT H, M

IF PRY = 340 THEN PRY = 85: PRX = PRX + 15
 IF BLE = 340 THEN BLE = 85: BLX = BLX + 15
  IF RED = 340 THEN RED = 85: RDX = RDX + 15
   IF PRX > 20 THEN LINE (2, 85)-(31, 355), 0, BF: PRX = 2: Scr = Scr + 4010
    IF BLX > 50 THEN LINE (32, 85)-(61, 355), 0, BF: BLX = 32: Scr = Scr + 5020
     IF RDX > 80 THEN LINE (62, 85)-(91, 355), 0, BF: RDX = 62: Scr = Scr + 6030:  LOCATE 24, 38: PRINT "Code is:": LOCATE 25, 38: PRINT "pause game,leVel,enter,# of level to go to"

IF K(E, I) = 1 THEN
 Scr = Scr + (3 * Lvl) + ((10 - Spd) * 2) + (R * 2) + 20
 GET (E * 15 + 101, 48)-(E * 15 + 114, I * 15 + 48), Drop%
 LINE (E * 15 + 101, 48)-(E * 15 + 114, I * 15 + 48), 0, BF
 PUT (E * 15 + 101, 93), Drop%, PSET
 GOTO Ok
END IF
IF K(E, I) = 2 THEN
 Scr = Scr + (3 * Lvl) + ((10 - Spd) * 2) + (R * 2) + 20
 FOR J = 100 TO 130 STEP 15
  GET (E * 15 + J, 48)-(E * 15 + J + 15, I * 15 + 48), Drop%
  LINE (E * 15 + J, 48)-(E * 15 + J + 15, I * 15 + 48), 0, BF
  PUT (E * 15 + J, 63), Drop%, PSET
 NEXT J
 GOTO Ok
END IF
RETURN

Super:
Mth = 0: CN = INT(RND * 12): P(CN, 9) = 0: P(CN, 10) = 0: P(CN, 11) = 0
Scr = Scr + (3 * Lvl) + ((10 - Spd) * 2) + (R * 2) + 10: CN = CN * 15 + 100
LINE (CN, 230)-(CN + 15, 230), 0: GET (CN, 183)-(CN + 15, 229), Spr%
FOR Y1 = 184 TO 354
LINE (CN, Y1 - 1)-(CN + 15, Y1 - 1), 0: PUT (CN, Y1), Spr%, PSET
CLL = POINT(CN + 1, Y1 + 47)
IF CLL > 0 THEN PUT (CN, Y1 + 1), Spr%, PSET: CALL Arena: GOTO 5
NEXT Y1
CALL Arena

5
CALL Plcheck
REDIM K(12, 11)
FOR M = 0 TO 12: FOR H = 0 TO 9
IF L(M, H) = 1 AND L(M, H + 1) = 1 AND L(M, H + 2) = 1 THEN LINE (M * 15 + 100, H * 15 + 235)-((M * 15 + 100) + 15, (H * 15 + 235) + 45), 0, BF: L(M, H) = 0: L(M, H + 1) = 0: L(M, H + 2) = 0: K(M, H) = 1: I = H: E = M: TMth = TMth + 1: BM = BM + 1: PRY = PRY + 15: PUT (PRX, PRY), B1%, PSET
IF L(M, H) = 2 AND L(M, H + 1) = 2 AND L(M, H + 2) = 2 THEN LINE (M * 15 + 100, H * 15 + 235)-((M * 15 + 100) + 15, (H * 15 + 235) + 45), 0, BF: L(M, H) = 0: L(M, H + 1) = 0: L(M, H + 2) = 0: K(M, H) = 1: I = H: E = M: TMth = TMth + 1: BM = BM + 1: BLE = BLE + 15: PUT (BLX, BLE), B2%, PSET
IF L(M, H) = 3 AND L(M, H + 1) = 3 AND L(M, H + 2) = 3 THEN LINE (M * 15 + 100, H * 15 + 235)-((M * 15 + 100) + 15, (H * 15 + 235) + 45), 0, BF: L(M, H) = 0: L(M, H + 1) = 0: L(M, H + 2) = 0: K(M, H) = 1: I = H: E = M: TMth = TMth + 1: BM = BM + 1: RED = RED + 15: PUT (RDX, RED), B3%, PSET
NEXT H, M
FOR M = 0 TO 10: FOR H = 0 TO 11
IF L(M, H) = 1 AND L(M + 1, H) = 1 AND L(M + 2, H) = 1 THEN LINE (M * 15 + 100, H * 15 + 235)-((M * 15 + 100) + 45, (H * 15 + 235) + 15), 0, BF: L(M, H) = 0: L(M + 1, H) = 0: L(M + 2, H) = 0: K(M, H) = 2: I = H: E = M: TMth = TMth + 1: BM = BM + 1: PRY = PRY + 15: PUT (PRX, PRY), B1%, PSET
IF L(M, H) = 2 AND L(M + 1, H) = 2 AND L(M + 2, H) = 2 THEN LINE (M * 15 + 100, H * 15 + 235)-((M * 15 + 100) + 45, (H * 15 + 235) + 15), 0, BF: L(M, H) = 0: L(M + 1, H) = 0: L(M + 2, H) = 0: K(M, H) = 2: I = H: E = M: TMth = TMth + 1: BM = BM + 1: BLE = BLE + 15: PUT (BLX, BLE), B2%, PSET
IF L(M, H) = 3 AND L(M + 1, H) = 3 AND L(M + 2, H) = 3 THEN LINE (M * 15 + 100, H * 15 + 235)-((M * 15 + 100) + 45, (H * 15 + 235) + 15), 0, BF: L(M, H) = 0: L(M + 1, H) = 0: L(M + 2, H) = 0: K(M, H) = 2: I = H: E = M: TMth = TMth + 1: BM = BM + 1: RED = RED + 15: PUT (RDX, RED), B3%, PSET
NEXT H, M

IF PRY = 340 THEN PRY = 85: PRX = PRX + 15
 IF BLE = 340 THEN BLE = 85: BLX = BLX + 15
  IF RED = 340 THEN RED = 85: RDX = RDX + 15
   IF PRX > 20 THEN LINE (2, 85)-(31, 355), 0, BF: PRX = 2: Scr = Scr + 4010
    IF BLX > 50 THEN LINE (32, 85)-(61, 355), 0, BF: BLX = 32: Scr = Scr + 5020
     IF RDX > 80 THEN LINE (62, 85)-(91, 355), 0, BF: RDX = 62: Scr = Scr + 6030:  LOCATE 24, 38: PRINT "Code is:": LOCATE 25, 38: PRINT "pause game,leVel,enter,# of level to go to"

IF K(E, I) = 1 THEN
 Scr = Scr + (3 * Lvl) + ((10 - Spd) * 2) + (R * 2) + 50
 GET (E * 15 + 100, 235)-(E * 15 + 115, I * 15 + 235), Drop%
 LINE (E * 15 + 100, 235)-(E * 15 + 115, I * 15 + 235), 0, BF
 PUT (E * 15 + 100, 280), Drop%, PSET
 GOTO Ok
END IF
IF K(E, I) = 2 THEN
 Scr = Scr + (3 * Lvl) + ((10 - Spd) * 2) + (R * 2) + 50
 FOR J = 100 TO 130 STEP 15
  GET (E * 15 + J, 235)-(E * 15 + J + 15, I * 15 + 235), Drop%
  LINE (E * 15 + J, 235)-(E * 15 + J + 15, I * 15 + 235), 0, BF
  PUT (E * 15 + J, 250), Drop%, PSET
 NEXT J
 GOTO Ok
END IF
RETURN

Green:
FOR II = 1 TO 1000: NEXT II
LINE (X - 15, Y - 15)-(X + 30, Y + 30), 0, BF: CALL Arena
CALL Plcheck
B = 0: A = 0
FOR A = 0 TO 11: FOR B = 0 TO 10
IF L(A, B) > 0 THEN
11 QQ = INT(RND * 3) + 1
 IF QQ = L(A, B) THEN GOTO 11
 IF QQ = 1 THEN L(A, B) = QQ: PUT (A * 15 + 100, B * 15 + 235), B1%, PSET
 IF QQ = 2 THEN L(A, B) = QQ: PUT (A * 15 + 100, B * 15 + 235), B2%, PSET
 IF QQ = 3 THEN L(A, B) = QQ: PUT (A * 15 + 100, B * 15 + 235), B3%, PSET
END IF
NEXT B, A
CALL Plcheck
GOSUB Super
RETURN

PauseIt:
COLOR 0
                                                                              LOCATE 2, 1: INPUT "", XX$
                                                                              IF XX$ <> "leVel" THEN RETURN ELSE Cod = 1
SLEEP
                                                                              SELECT CASE INKEY$
                                                                              CASE IS <= STR$(Lvl)
                                                                               RETURN
CASE "2"
 BM = 0: Lvl = 2: Spd = 8
CASE "3"
 BM = 0: Lvl = 3: Spd = 7
CASE "4"
 BM = 0: Lvl = 4: Spd = 6
CASE "5"
 BM = 0: Lvl = 5: Spd = 5
CASE "6"
 BM = 0: Lvl = 6: Spd = 4
CASE "7"
 BM = 0: Lvl = 7: Spd = 3
CASE "8"
 BM = 0: Lvl = 8: Spd = 2
CASE "9"
 BM = 0: Lvl = 9: Spd = 1
END SELECT
RETURN


2345
DO
LOCATE 28, 2: PRINT "Play again (y/n):"
SELECT CASE INKEY$
CASE "y", "Y"
Scr = 0: Lvl = 0: Scr2 = 0: BM2 = 0: TMth2 = 0: GOTO Blocks
CASE "n", "N"
CALL Credits: SYSTEM
END SELECT
LOOP

SUB Arena
LINE (0, 0)-(639, 58), 0, BF
LINE (99, 59)-(0, 59), 15
LINE (99, 83)-(0, 83), 15
COLOR 15: LOCATE 5, 3: PRINT "*KILLED*"
LINE (281, 59)-(639, 59), 15
LINE (99, 59)-(99, 401), 15
LINE (281, 59)-(281, 401), 15
LINE (99, 230)-(281, 230), 15
LINE (99, 401)-(281, 401), 15
LINE (0, 59)-(0, 401), 15
LINE (0, 401)-(99, 401), 15
LOCATE 5, 38: PRINT "Total Matches for Game:"; TMth
 LOCATE 7, 38: PRINT "Score:"; Scr: LOCATE 6, 38: PRINT "Bottom Matches:"; BM
 LOCATE 9, 38: PRINT "Level:"; Lvl: LOCATE 10, 38: PRINT "Speed:"; Spd
END SUB

SUB Arena2
LINE (0, 59)-(99, 59), 15
LINE (99, 59)-(99, 401), 15
LINE (281, 59)-(281, 401), 15
LINE (99, 230)-(281, 230), 15
LINE (99, 401)-(281, 401), 15
LINE (281, 59)-(379, 59), 15
LINE (561, 59)-(639, 59), 15
LINE (379, 59)-(379, 401), 15
LINE (561, 59)-(561, 401), 15
LINE (379, 230)-(561, 230), 15
LINE (379, 401)-(561, 401), 15
LOCATE 5, 38: PRINT "TIME LEFT"
LOCATE 8, 39: PRINT "MATCHES"
LOCATE 9, 39: PRINT "<--"; TMth
LOCATE 10, 39: PRINT TMth2; "-->"
LOCATE 12, 39: PRINT "BOTTOM"
LOCATE 13, 39: PRINT "<--"; BM
LOCATE 14, 39: PRINT BM2; "-->"
END SUB

SUB Bonus (A)
BEEP
IF A = 1 THEN
FOR F = 0 TO 12: FOR G = 0 TO 11
 H = POINT(F * 15 + 101, G * 15 + 49)
 IF H = 13 THEN LINE (F * 15 + 100, G * 15 + 48)-(F * 15 + 115, G * 15 + 63), 0, BF
NEXT G, F
END IF
IF A = 2 THEN
FOR F = 0 TO 12: FOR G = 0 TO 11
 H = POINT(F * 15 + 101, G * 15 + 49)
 IF H = 9 THEN LINE (F * 15 + 100, G * 15 + 48)-(F * 15 + 115, G * 15 + 63), 0, BF
NEXT G, F
END IF
IF A = 3 THEN
FOR F = 0 TO 12: FOR G = 0 TO 11
 H = POINT(F * 15 + 101, G * 15 + 49)
 IF H = 12 THEN LINE (F * 15 + 100, G * 15 + 48)-(F * 15 + 115, G * 15 + 63), 0, BF
NEXT G, F
END IF
Plcheck
END SUB

SUB Credits
SCREEN 13
Z5 = 0: Z4 = 0
PALETTE 1, 0: PALETTE 2, 0
PALETTE 14, 0: PALETTE 4, 0
COLOR 1: LOCATE 11, 12: PRINT "     Credits     "
LINE (145, 90)-(165, 90), 1
COLOR 2: LOCATE 13, 12: PRINT "Coded by Maverick"
COLOR 14: LOCATE 13, 21: PRINT "M": LOCATE 13, 24: PRINT "e"
LOCATE 13, 26: PRINT "i": LOCATE 13, 28: PRINT "k"
COLOR 4: LOCATE 14, 12: PRINT "  and Mike Hulme "

DO
PALETTE 1, (256 ^ 2 * Z5) + (256 * Z5) + Z5
PALETTE 2, (256 ^ 2 * Z5) + (256 * Z5) + Z5
PALETTE 14, (256 ^ 2 * Z5) + (256 * Z5) + Z5
IF Z5 < 63 THEN Z5 = Z5 + 1
LOOP UNTIL Z5 = 63
Z = 63: Z2 = Z: Z3 = Z
DO
PALETTE 1, (256 ^ 2 * Z3) + (256 * Z2) + Z
PALETTE 2, (256 ^ 2 * Z) + (256 * 0) + 0
PALETTE 4, (256 ^ 2 * 0) + (256 * 0) + Z4
PALETTE 14, (256 ^ 2 * Z) + (256 * 0) + Z2
IF Z > 0 THEN Z = Z - 1
IF Z = 0 AND Z2 > 0 THEN Z2 = Z2 - 1
IF Z2 = 0 THEN Z3 = Z3 - 1: Z4 = Z4 + 1
LOOP UNTIL Z3 = 0
SCREEN 7: SCREEN 13

COLOR 15

END SUB

SUB Green2
FOR II = 1 TO 1000: NEXT II
LINE (X - 15, Y - 15)-(X + 30, Y + 30), 0, BF
LINE (X2 - 15, Y2 - 15)-(X2 + 30, Y2 + 30), 0, BF: CALL Arena2
CALL PLQW
FOR A = 0 TO 11: FOR B = 0 TO 10
IF L(A, B) > 0 THEN
211 QQ = INT(RND * 3) + 1
 IF QQ = L(A, B) THEN GOTO 211
 IF QQ = 1 THEN L(A, B) = QQ: PUT (A * 15 + 100, B * 15 + 235), B1%, PSET
 IF QQ = 2 THEN L(A, B) = QQ: PUT (A * 15 + 100, B * 15 + 235), B2%, PSET
 IF QQ = 3 THEN L(A, B) = QQ: PUT (A * 15 + 100, B * 15 + 235), B3%, PSET
END IF
IF W(A, B) > 0 THEN
311 QQ = INT(RND * 3) + 1
 IF QQ = W(A, B) THEN GOTO 311
 IF QQ = 1 THEN W(A, B) = QQ: PUT (A * 15 + 380, B * 15 + 235), B1%, PSET
 IF QQ = 2 THEN W(A, B) = QQ: PUT (A * 15 + 380, B * 15 + 235), B2%, PSET
 IF QQ = 3 THEN W(A, B) = QQ: PUT (A * 15 + 380, B * 15 + 235), B3%, PSET
END IF
NEXT B, A
CALL PLQW
CALL Timing
END SUB

SUB HighScore
LOCATE 13, 38: PRINT "Save your stats:"
LOCATE 15, 39: PRINT "Score: "; Scr
LOCATE 16, 39: PRINT "Level: "; Lvl
LOCATE 17, 39: PRINT "Matches: "; TMth
LOCATE 14, 39: INPUT "Name: ", name$
OPEN "C:\TRYTOO.HGH" FOR APPEND AS #2
IF Cod = 1 THEN name$ = name$ + ""
PRINT #2, name$; ","; Scr; ","; Lvl; ","; TMth; ","; DATE$
CLOSE #2
OPEN "C:\TRYTOO.HGH" FOR INPUT AS #1
OPEN "C:\TRYTOO2.HGH" FOR APPEND AS #2
R = 0
DO
R = R + 1
LINE INPUT #1, A$
IF A$ = "" OR A$ = " " THEN GOTO 34
PRINT #2, A$
34 LOOP UNTIL EOF(1) OR R = 90
CLOSE #2: CLOSE #1
SHELL "CD C:\"
SHELL "ERASE TRYTOO.HGH"
SHELL "RENAME TRYTOO2.HGH TRYTOO.HGH"

DIM N$(0 TO 100): DIM S$(0 TO 100): DIM T$(0 TO 100): DIM M$(0 TO 100): DIM D$(0 TO 100)
Q = 0: QQ = 0
OPEN "c:\TRYTOO.HGH" FOR INPUT AS #1
OPEN "C:\TRYTOO2.HGH" FOR APPEND AS #2
DO
Q = Q + 1
INPUT #1, N$(Q), S$(Q), T$(Q), M$(Q), D$(Q)
LOOP UNTIL EOF(1)
QQ = Q
FOR E1% = 1 TO Q
FOR E2% = E1% + 1 TO QQ
  s1 = VAL(M$(E1%))
  s2 = VAL(M$(E2%))
  IF s1 < s2 THEN
   SWAP N$(E1%), N$(E2%)
   SWAP S$(E1%), S$(E2%)
   SWAP T$(E1%), T$(E2%)
   SWAP M$(E1%), M$(E2%)
   SWAP D$(E1%), D$(E2%)
  END IF
NEXT E2%
NEXT E1%
W = 0
DO
W = W + 1
PRINT #2, N$(W); ","; S$(W); ","; T$(W); ","; M$(W); ","; D$(W)
LOOP UNTIL W = QQ

CLOSE #2: CLOSE #1
SHELL "CD C:\"
SHELL "ERASE TRYTOO.HGH"
SHELL "RENAME TRYTOO2.HGH TRYTOO.HGH"
CLS
LINE (0, 0)-(639, 479), 15, B: LINE (3, 3)-(636, 476), 15, B
LOCATE 2, 29: PRINT "HIGHEST TRYTOO MATCHES"
LOCATE 4, 11: PRINT "NAME"
LOCATE 4, 29: PRINT "SCORE"
LOCATE 4, 39: PRINT "LEVEL"
LOCATE 4, 50: PRINT "MATCHES"
LOCATE 4, 66: PRINT "DATE"
X = 6
DO
LOCATE X, 2: PRINT X - 5
LOCATE X, 5: PRINT "."
X = X + 1
LOOP UNTIL X = 26

X = 6
OPEN "C:\TRYTOO.HGH" FOR INPUT AS #1
DO
INPUT #1, N$, S$, T$, M$, D$
IF name$ = N$ AND Scr = VAL(S$) THEN COLOR 15 ELSE COLOR 8
LOCATE X, 7: PRINT N$
LOCATE X, 29: PRINT S$
LOCATE X, 41: PRINT T$
LOCATE X, 52: PRINT M$
LOCATE X, 63: PRINT D$
FOR I = 1 TO 1500: NEXT I
X = X + 1
LOOP UNTIL EOF(1) OR X = 26
CLOSE #1
COLOR 15
LOCATE 28, 2: PRINT "Play again (y/n):"
END SUB

SUB MavInc
SCREEN 13: CLS
DIM M1(100): DIM A1(100): DIM V1(100): DIM E1(100): DIM R1(100)
DIM I1(100): DIM C1(100): DIM K1(100): DIM BL(100): DIM D(8, 8)
DIM AA%(100), BB%(100), CC%(100), DD%(100)
COLOR 4: GET (0, 0)-(7, 7), DD%: LOCATE 1, 1: PRINT "1"
GET (0, 0)-(7, 7), AA%: LOCATE 1, 1: PRINT "9"
GET (0, 0)-(7, 7), BB%: LOCATE 1, 1: PRINT "5"
GET (0, 0)-(7, 7), CC%
COLOR 4: LOCATE 2, 2: PRINT "M": GET (6, 6)-(18, 18), M1
COLOR 1: LOCATE 2, 2: PRINT "A": GET (6, 6)-(18, 18), A1
COLOR 2: LOCATE 2, 2: PRINT "V": GET (6, 6)-(15, 16), V1
COLOR 14: LOCATE 2, 2: PRINT "E": GET (6, 6)-(17, 17), E1
COLOR 1: LOCATE 2, 2: PRINT "R": GET (6, 6)-(17, 17), R1
COLOR 4: LOCATE 2, 2: PRINT "I": GET (6, 6)-(17, 17), I1
COLOR 2: LOCATE 2, 2: PRINT "C": GET (6, 6)-(17, 17), C1
COLOR 14: LOCATE 2, 2: PRINT "K": GET (6, 6)-(17, 17), K1
COLOR 8: LOCATE 1, 1: PRINT ""
FOR X = 0 TO 6: FOR Y = 0 TO 8
C = POINT(X, Y): IF C > 0 THEN C = 1 ELSE C = 0
D(X, Y) = C
NEXT Y, X

CLS : A = 160: GET (0, 0)-(10, 10), BL
PALETTE 8, 0: CL = 2: PALETTE 6, 0: RR = 0
FOR X = 0 TO 8: FOR Y = 0 TO 8
IF D(X, Y) = 1 THEN LINE (X * 3 + 90, Y * 3 + 83)-(X * 3 + 2 + 90, Y * 3 + 2 + 83), 8, BF: LINE (X * 3 + 225, Y * 3 + 83)-(X * 3 + 2 + 225, Y * 3 + 2 + 83), 8, BF
NEXT Y, X

DO
FOR N = 0 TO 3.14 STEP .05
K = 3.14 - N: M = SIN(N) * 10: J = SIN(-K) * 10
E = SIN(M) * 10: F = COS(-K) * J
PUT ((M * 3.5) + A - 5, (N * 30) + 48), C1, PSET
PUT ((J * 3.5) + A + 13, (K * 30) + 47), A1, PSET
PUT ((E * 3.5) + A + 10, (N * 30) + 46), V1, PSET
PUT ((F * 3.5) + A + 10, (K * 30) + 50), R1, PSET
PUT ((M * 3.5) + A + 5, (N * 30) + 44), K1, PSET
PUT ((J * 3.5) + A + 2, (K * 30) + 45), M1, PSET
PUT ((-E * 3.5) + A, (N * 30) + 43), I1, PSET
PUT ((F * 3.5) + A, (K * 30) + 42), E1, PSET
FOR I = 1 TO 300: NEXT I
PUT ((E * 3.5) + A + 10, (N * 30) + 46), BL, PSET
PUT ((-E * 3.5) + A, (N * 30) + 43), BL, PSET
IF Q = 0 THEN CL = CL + 2 ELSE CL = CL - 2
IF CL = 62 THEN Q = 1
IF CL = 2 THEN Q = 0
PALETTE 8, (256 ^ 2 * CL) + (256 * CL) + CL
IF RR = 0 AND N > 1.5 THEN EXIT DO
SELECT CASE INKEY$
CASE IS > ""
 EXIT DO
END SELECT
NEXT N
RR = RR + 1
LOOP
PUT ((E * 3.5) + A + 10, (N * 30) + 46), V1, PSET
PUT ((-E * 3.5) + A, (N * 30) + 43), I1, PSET
COLOR 6: Q = 0: CL2 = 10
Z = 63: Z2 = Z: Z3 = Z
DO
PALETTE 8, (256 ^ 2 * Z) + (256 * Z2) + Z3
IF Z > 0 THEN Z = Z - 1
IF Z = 0 AND Z2 > 0 THEN Z2 = Z2 - 1
IF Z2 = 0 THEN Z3 = Z3 - 1
FOR I = 1 TO 50: NEXT I
LOOP UNTIL Z3 = 1

DO
FOR Y = 0 TO 3.14 STEP .1
X = SIN(Y) * 20
Y2 = Y - 0!: X2 = SIN(Y2) * 25
Y3 = Y - 0!: X3 = SIN(Y2) * 30
Y4 = Y - 0!: X4 = SIN(Y2) * 35
PUT ((X * 4) + 160, (Y * 50) + 25), AA%, PSET
PUT ((X2 * 4) + 160, (Y2 * 50) + 25), BB%, PSET
PUT ((X3 * 4) + 160, (Y3 * 50) + 25), BB%, PSET
PUT ((X4 * 4) + 160, (Y4 * 50) + 25), CC%, PSET
FOR I = 1 TO 400: NEXT I
PUT ((X * 4) + 160, (Y * 50) + 25), DD%, PSET
PUT ((X2 * 4) + 160, (Y2 * 50) + 25), DD%, PSET
PUT ((X3 * 4) + 160, (Y3 * 50) + 25), DD%, PSET
PUT ((X4 * 4) + 160, (Y4 * 50) + 25), DD%, PSET
SELECT CASE INKEY$
CASE IS > ""
 EXIT DO
END SELECT
NEXT Y
RR = RR + 1
FOR Y = 3.14 TO 0 STEP -.1
X = SIN(-Y) * 20
Y2 = Y + 0!: X2 = SIN(-Y2) * 25
Y3 = Y + 0!: X3 = SIN(-Y2) * 30
Y4 = Y + 0!: X4 = SIN(-Y2) * 35
PUT ((X * 4) + 160, (Y * 50) + 25), AA%, PSET
PUT ((X2 * 4) + 160, (Y2 * 50) + 25), BB%, PSET
PUT ((X3 * 4) + 160, (Y3 * 50) + 25), BB%, PSET
PUT ((X4 * 4) + 160, (Y4 * 50) + 25), CC%, PSET
FOR I = 1 TO 400: NEXT I
PUT ((X * 4) + 160, (Y * 50) + 25), DD%, PSET
PUT ((X2 * 4) + 160, (Y2 * 50) + 25), DD%, PSET
PUT ((X3 * 4) + 160, (Y3 * 50) + 25), DD%, PSET
PUT ((X4 * 4) + 160, (Y4 * 50) + 25), DD%, PSET
SELECT CASE INKEY$
CASE IS > ""
 EXIT DO
END SELECT
NEXT Y
RR = RR + 1
LOOP UNTIL INKEY$ > "" OR RR = 2
Z = 63: Z2 = Z: Z3 = Z

DO
PALETTE 1, (256 ^ 2 * Z) + (256 * Z) + Z
PALETTE 2, (256 ^ 2 * Z2) + (256 * Z) + Z
PALETTE 4, (256 ^ 2 * Z) + (256 * Z2) + Z3
PALETTE 14, (256 ^ 2 * Z3) + (256 * Z2) + Z
IF Z > 0 THEN Z = Z - 1
IF Z = 0 AND Z2 > 0 THEN Z2 = Z2 - 1
IF Z2 = 0 THEN Z3 = Z3 - 1
LOOP UNTIL Z3 = 0
SCREEN 7: SCREEN 13
COLOR 15

END SUB

SUB MouseDriver (ax%, BX%, cx%, dx%)
  DEF SEG = VARSEG(MOUSE$)
  MOUSE% = SADD(MOUSE$)
  CALL Absolute(ax%, BX%, cx%, dx%, MOUSE%)
END SUB

SUB MouseHide
 ax% = 2
 MouseDriver ax%, 0, 0, 0
END SUB

FUNCTION MouseInit%
ax% = 0
MouseDriver ax%, 0, 0, 0
MouseInit% = ax%
END FUNCTION

SUB MouseStatus (LB%, RB%, XM%, YM%)
  ax% = 3
  MouseDriver ax%, BX%, cx%, dx%
  LB% = ((BX% AND 1) <> 0)
  RB% = ((BX% AND 2) <> 0)
  XM% = cx%
  YM% = dx%
END SUB

SUB Ok2
10
CALL PLQW
REDIM K(12, 11)
FOR M = 0 TO 12: FOR H = 0 TO 9
IF P(M, H) = 1 AND P(M, H + 1) = 1 AND P(M, H + 2) = 1 THEN LINE (M * 15 + 100, H * 15 + 48)-((M * 15 + 100) + 15, (H * 15 + 48) + 45), 0, BF: P(M, H) = 0: P(M, H + 1) = 0: P(M, H + 2) = 0: K(M, H) = 1: I = H: E = M: I2 = H: E2 = M: Mth = Mth + 1: TMth = TMth + 1
IF P(M, H) = 2 AND P(M, H + 1) = 2 AND P(M, H + 2) = 2 THEN LINE (M * 15 + 100, H * 15 + 48)-((M * 15 + 100) + 15, (H * 15 + 48) + 45), 0, BF: P(M, H) = 0: P(M, H + 1) = 0: P(M, H + 2) = 0: K(M, H) = 1: I = H: E = M: I2 = H: E2 = M: Mth = Mth + 1: TMth = TMth + 1
IF Q(M, H) = 1 AND Q(M, H + 1) = 1 AND Q(M, H + 2) = 1 THEN LINE (M * 15 + 380, H * 15 + 48)-((M * 15 + 380) + 15, (H * 15 + 48) + 45), 0, BF: Q(M, H) = 0: Q(M, H + 1) = 0: Q(M, H + 2) = 0: K(M, H) = 3: I = H: E = M: I2 = H: E2 = M: Mth2 = Mth2 + 1: TMth2 = TMth2 + 1
IF Q(M, H) = 2 AND Q(M, H + 1) = 2 AND Q(M, H + 2) = 2 THEN LINE (M * 15 + 380, H * 15 + 48)-((M * 15 + 380) + 15, (H * 15 + 48) + 45), 0, BF: Q(M, H) = 0: Q(M, H + 1) = 0: Q(M, H + 2) = 0: K(M, H) = 3: I = H: E = M: I2 = H: E2 = M: Mth2 = Mth2 + 1: TMth2 = TMth2 + 1
IF Q(M, H) = 3 AND Q(M, H + 1) = 3 AND Q(M, H + 2) = 3 THEN LINE (M * 15 + 380, H * 15 + 48)-((M * 15 + 380) + 15, (H * 15 + 48) + 45), 0, BF: Q(M, H) = 0: Q(M, H + 1) = 0: Q(M, H + 2) = 0: K(M, H) = 3: I = H: E = M: I2 = H: E2 = M: Mth2 = Mth2 + 1: TMth2 = TMth2 + 1
IF P(M, H) = 3 AND P(M, H + 1) = 3 AND P(M, H + 2) = 3 THEN LINE (M * 15 + 100, H * 15 + 48)-((M * 15 + 100) + 15, (H * 15 + 48) + 45), 0, BF: P(M, H) = 0: P(M, H + 1) = 0: P(M, H + 2) = 0: K(M, H) = 1: I = H: E = M: I2 = H: E2 = M: Mth = Mth + 1: TMth = TMth + 1
NEXT H, M
FOR M = 0 TO 10: FOR H = 0 TO 11
IF P(M, H) = 1 AND P(M + 1, H) = 1 AND P(M + 2, H) = 1 THEN LINE (M * 15 + 100, H * 15 + 48)-((M * 15 + 100) + 45, (H * 15 + 48) + 15), 0, BF: P(M, H) = 0: P(M + 1, H) = 0: P(M + 2, H) = 0: K(M, H) = 2: I = H: E = M: I2 = H: E2 = M: Mth = Mth + 1: TMth = TMth + 1
IF Q(M, H) = 1 AND Q(M + 1, H) = 1 AND Q(M + 2, H) = 1 THEN LINE (M * 15 + 380, H * 15 + 48)-((M * 15 + 380) + 45, (H * 15 + 48) + 15), 0, BF: Q(M, H) = 0: Q(M + 1, H) = 0: Q(M + 2, H) = 0: K(M, H) = 4: I = H: E = M: I2 = H: E2 = M: Mth2 = Mth2 + 1: TMth2 = TMth2 + 1
IF Q(M, H) = 2 AND Q(M + 1, H) = 2 AND Q(M + 2, H) = 2 THEN LINE (M * 15 + 380, H * 15 + 48)-((M * 15 + 380) + 45, (H * 15 + 48) + 15), 0, BF: Q(M, H) = 0: Q(M + 1, H) = 0: Q(M + 2, H) = 0: K(M, H) = 4: I = H: E = M: I2 = H: E2 = M: Mth2 = Mth2 + 1: TMth2 = TMth2 + 1
IF Q(M, H) = 3 AND Q(M + 1, H) = 3 AND Q(M + 2, H) = 3 THEN LINE (M * 15 + 380, H * 15 + 48)-((M * 15 + 380) + 45, (H * 15 + 48) + 15), 0, BF: Q(M, H) = 0: Q(M + 1, H) = 0: Q(M + 2, H) = 0: K(M, H) = 4: I = H: E = M: I2 = H: E2 = M: Mth2 = Mth2 + 1: TMth2 = TMth2 + 1
IF P(M, H) = 2 AND P(M + 1, H) = 2 AND P(M + 2, H) = 2 THEN LINE (M * 15 + 100, H * 15 + 48)-((M * 15 + 100) + 45, (H * 15 + 48) + 15), 0, BF: P(M, H) = 0: P(M + 1, H) = 0: P(M + 2, H) = 0: K(M, H) = 2: I = H: E = M: I2 = H: E2 = M: Mth = Mth + 1: TMth = TMth + 1
IF P(M, H) = 3 AND P(M + 1, H) = 3 AND P(M + 2, H) = 3 THEN LINE (M * 15 + 100, H * 15 + 48)-((M * 15 + 100) + 45, (H * 15 + 48) + 15), 0, BF: P(M, H) = 0: P(M + 1, H) = 0: P(M + 2, H) = 0: K(M, H) = 2: I = H: E = M: I2 = H: E2 = M: Mth = Mth + 1: TMth = TMth + 1
NEXT H, M
CALL Timing
IF K(E, I) = 1 THEN
 GET (E * 15 + 101, 48)-(E * 15 + 114, I * 15 + 48), Drop%
 LINE (E * 15 + 101, 48)-(E * 15 + 114, I * 15 + 48), 0, BF
 PUT (E * 15 + 101, 48 + 45), Drop%, PSET
 CALL PLQW
 GOTO 10
END IF
IF K(E, I) = 2 THEN
 FOR J = 100 TO 130 STEP 15
  GET (E * 15 + J, 48)-(E * 15 + J + 15, I * 15 + 48), Drop%
  LINE (E * 15 + J, 48)-(E * 15 + J + 15, I * 15 + 48), 0, BF
  PUT (E * 15 + J, 48 + 15), Drop%, PSET
 NEXT J
 CALL PLQW
 GOTO 10
END IF
IF K(E2, I2) = 3 THEN
 GET (E2 * 15 + 381, 48)-(E2 * 15 + 394, I2 * 15 + 48), Drop2%
 LINE (E2 * 15 + 381, 48)-(E2 * 15 + 394, I2 * 15 + 48), 0, BF
 PUT (E2 * 15 + 381, 48 + 45), Drop2%, PSET
 CALL PLQW
 GOTO 10
END IF
IF K(E2, I2) = 4 THEN
 FOR J = 380 TO 410 STEP 15
  GET (E2 * 15 + J, 48)-(E2 * 15 + J + 15, I2 * 15 + 48), Drop2%
  LINE (E2 * 15 + J, 48)-(E2 * 15 + J + 15, I2 * 15 + 48), 0, BF
  PUT (E2 * 15 + J, 48 + 15), Drop2%, PSET
 NEXT J
 CALL PLQW
 GOTO 10
END IF
END SUB

SUB Ok3
110
CALL PLQW
REDIM K(12, 11)
FOR M = 0 TO 12: FOR H = 0 TO 9
IF L(M, H) = 1 AND L(M, H + 1) = 1 AND L(M, H + 2) = 1 THEN LINE (M * 15 + 100, H * 15 + 235)-((M * 15 + 100) + 15, (H * 15 + 235) + 45), 0, BF: L(M, H) = 0: L(M, H + 1) = 0: L(M, H + 2) = 0: K(M, H) = 1: I2 = H: E2 = M: I = H: E = M: BM = BM + 1
IF L(M, H) = 2 AND L(M, H + 1) = 2 AND L(M, H + 2) = 2 THEN LINE (M * 15 + 100, H * 15 + 235)-((M * 15 + 100) + 15, (H * 15 + 235) + 45), 0, BF: L(M, H) = 0: L(M, H + 1) = 0: L(M, H + 2) = 0: K(M, H) = 1: I2 = H: E2 = M: I = H: E = M: BM = BM + 1
IF W(M, H) = 1 AND W(M, H + 1) = 1 AND W(M, H + 2) = 1 THEN LINE (M * 15 + 380, H * 15 + 235)-((M * 15 + 380) + 15, (H * 15 + 235) + 45), 0, BF: W(M, H) = 0: W(M, H + 1) = 0: W(M, H + 2) = 0: K(M, H) = 3: I2 = H: E2 = M: I = H: E = M: BM2 = BM2 + 1
IF W(M, H) = 2 AND W(M, H + 1) = 2 AND W(M, H + 2) = 2 THEN LINE (M * 15 + 380, H * 15 + 235)-((M * 15 + 380) + 15, (H * 15 + 235) + 45), 0, BF: W(M, H) = 0: W(M, H + 1) = 0: W(M, H + 2) = 0: K(M, H) = 3: I2 = H: E2 = M: I = H: E = M: BM2 = BM2 + 1
IF W(M, H) = 3 AND W(M, H + 1) = 3 AND W(M, H + 2) = 3 THEN LINE (M * 15 + 380, H * 15 + 235)-((M * 15 + 380) + 15, (H * 15 + 235) + 45), 0, BF: W(M, H) = 0: W(M, H + 1) = 0: W(M, H + 2) = 0: K(M, H) = 3: I2 = H: E2 = M: I = H: E = M: BM2 = BM2 + 1
IF L(M, H) = 3 AND L(M, H + 1) = 3 AND L(M, H + 2) = 3 THEN LINE (M * 15 + 100, H * 15 + 235)-((M * 15 + 100) + 15, (H * 15 + 235) + 45), 0, BF: L(M, H) = 0: L(M, H + 1) = 0: L(M, H + 2) = 0: K(M, H) = 1: I2 = H: E2 = M: I = H: E = M: BM = BM + 1
NEXT H, M
FOR M = 0 TO 10: FOR H = 0 TO 11
IF L(M, H) = 1 AND L(M + 1, H) = 1 AND L(M + 2, H) = 1 THEN LINE (M * 15 + 100, H * 15 + 235)-((M * 15 + 100) + 45, (H * 15 + 235) + 15), 0, BF: L(M, H) = 0: L(M + 1, H) = 0: L(M + 2, H) = 0: K(M, H) = 2: I2 = H: E2 = M: I = H: E = M: BM = BM + 1
IF W(M, H) = 1 AND W(M + 1, H) = 1 AND W(M + 2, H) = 1 THEN LINE (M * 15 + 380, H * 15 + 235)-((M * 15 + 380) + 45, (H * 15 + 235) + 15), 0, BF: W(M, H) = 0: W(M + 1, H) = 0: W(M + 2, H) = 0: K(M, H) = 4: I2 = H: E2 = M: I = H: E = M: BM2 = BM2 + 1
IF W(M, H) = 2 AND W(M + 1, H) = 2 AND W(M + 2, H) = 2 THEN LINE (M * 15 + 380, H * 15 + 235)-((M * 15 + 380) + 45, (H * 15 + 235) + 15), 0, BF: W(M, H) = 0: W(M + 1, H) = 0: W(M + 2, H) = 0: K(M, H) = 4: I2 = H: E2 = M: I = H: E = M: BM2 = BM2 + 1
IF W(M, H) = 3 AND W(M + 1, H) = 3 AND W(M + 2, H) = 3 THEN LINE (M * 15 + 380, H * 15 + 235)-((M * 15 + 380) + 45, (H * 15 + 235) + 15), 0, BF: W(M, H) = 0: W(M + 1, H) = 0: W(M + 2, H) = 0: K(M, H) = 4: I2 = H: E2 = M: I = H: E = M: BM2 = BM2 + 1
IF L(M, H) = 2 AND L(M + 1, H) = 2 AND L(M + 2, H) = 2 THEN LINE (M * 15 + 100, H * 15 + 235)-((M * 15 + 100) + 45, (H * 15 + 235) + 15), 0, BF: L(M, H) = 0: L(M + 1, H) = 0: L(M + 2, H) = 0: K(M, H) = 2: I2 = H: E2 = M: I = H: E = M: BM = BM + 1
IF L(M, H) = 3 AND L(M + 1, H) = 3 AND L(M + 2, H) = 3 THEN LINE (M * 15 + 100, H * 15 + 235)-((M * 15 + 100) + 45, (H * 15 + 235) + 15), 0, BF: L(M, H) = 0: L(M + 1, H) = 0: L(M + 2, H) = 0: K(M, H) = 2: I2 = H: E2 = M: I = H: E = M: BM = BM + 1
NEXT H, M
CALL Timing
IF K(E, I) = 1 THEN
 GET (E * 15 + 100, 235)-(E * 15 + 115, I * 15 + 235), Drop%
 LINE (E * 15 + 100, 235)-(E * 15 + 115, I * 15 + 235), 0, BF
 PUT (E * 15 + 100, 280), Drop%, PSET
 CALL PLQW
 EXIT SUB
END IF
IF K(E, I) = 2 THEN
 FOR J = 100 TO 130 STEP 15
  GET (E * 15 + J, 235)-(E * 15 + J + 15, I * 15 + 235), Drop%
  LINE (E * 15 + J, 235)-(E * 15 + J + 15, I * 15 + 235), 0, BF
  PUT (E * 15 + J, 250), Drop%, PSET
 NEXT J
 CALL PLQW
 EXIT SUB
END IF
IF K(E2, I2) = 3 THEN
 GET (E2 * 15 + 380, 235)-(E2 * 15 + 395, I2 * 15 + 235), Drop2%
 LINE (E2 * 15 + 380, 235)-(E2 * 15 + 395, I2 * 15 + 235), 0, BF
 PUT (E2 * 15 + 380, 280), Drop2%, PSET
 CALL PLQW
 EXIT SUB
END IF
IF K(E2, I2) = 4 THEN
 FOR J = 380 TO 410 STEP 15
  GET (E2 * 15 + J, 235)-(E2 * 15 + J + 15, I2 * 15 + 235), Drop2%
  LINE (E2 * 15 + J, 235)-(E2 * 15 + J + 15, I2 * 15 + 235), 0, BF
  PUT (E2 * 15 + J, 250), Drop2%, PSET
 NEXT J
 CALL PLQW
 EXIT SUB
END IF

END SUB

SUB Plcheck
FOR F = 0 TO 12: FOR G = 0 TO 11
 H = POINT(F * 15 + 101, G * 15 + 49)
 IF H = 13 THEN H = 1: PUT (F * 15 + 100, G * 15 + 48), B1%, PSET
 IF H = 9 THEN H = 2: PUT (F * 15 + 100, G * 15 + 48), B2%, PSET
 IF H = 12 THEN H = 3: PUT (F * 15 + 100, G * 15 + 48), B3%, PSET
 P(F, G) = H
NEXT G, F
FOR F = 0 TO 12: FOR G = 0 TO 11
 H = POINT(F * 15 + 101, G * 15 + 236)
 IF H = 13 THEN H = 1: PUT (F * 15 + 100, G * 15 + 235), B1%, PSET
 IF H = 9 THEN H = 2: PUT (F * 15 + 100, G * 15 + 235), B2%, PSET
 IF H = 12 THEN H = 3: PUT (F * 15 + 100, G * 15 + 235), B3%, PSET
 IF H = 0 THEN H = 0: LINE (F * 15 + 100, G * 15 + 235)-(F * 15 + 115, G * 15 + 250), 0, BF
 L(F, G) = H
NEXT G, F
CALL Arena
END SUB

SUB PLQW
FOR F = 0 TO 12: FOR G = 0 TO 11
 H = POINT(F * 15 + 101, G * 15 + 49)
 IF H = 13 THEN H = 1: PUT (F * 15 + 100, G * 15 + 48), B1%, PSET
 IF H = 9 THEN H = 2: PUT (F * 15 + 100, G * 15 + 48), B2%, PSET
 IF H = 12 THEN H = 3: PUT (F * 15 + 100, G * 15 + 48), B3%, PSET
 P(F, G) = H
NEXT G, F
FOR F = 0 TO 12: FOR G = 0 TO 11
 H = POINT(F * 15 + 101, G * 15 + 236)
 IF H = 13 THEN H = 1: PUT (F * 15 + 100, G * 15 + 235), B1%, PSET
 IF H = 9 THEN H = 2: PUT (F * 15 + 100, G * 15 + 235), B2%, PSET
 IF H = 12 THEN H = 3: PUT (F * 15 + 100, G * 15 + 235), B3%, PSET
 IF H = 0 THEN H = 0: LINE (F * 15 + 100, G * 15 + 235)-(F * 15 + 115, G * 15 + 250), 0, BF
 L(F, G) = H
NEXT G, F

FOR F = 0 TO 12: FOR G = 0 TO 11
 H = POINT(F * 15 + 381, G * 15 + 49)
 IF H = 13 THEN H = 1: PUT (F * 15 + 380, G * 15 + 48), B1%, PSET
 IF H = 9 THEN H = 2: PUT (F * 15 + 380, G * 15 + 48), B2%, PSET
 IF H = 12 THEN H = 3: PUT (F * 15 + 380, G * 15 + 48), B3%, PSET
 Q(F, G) = H
NEXT G, F
FOR F = 0 TO 12: FOR G = 0 TO 11
 H = POINT(F * 15 + 381, G * 15 + 236)
 IF H = 13 THEN H = 1: PUT (F * 15 + 380, G * 15 + 235), B1%, PSET
 IF H = 9 THEN H = 2: PUT (F * 15 + 380, G * 15 + 235), B2%, PSET
 IF H = 12 THEN H = 3: PUT (F * 15 + 380, G * 15 + 235), B3%, PSET
 IF H = 0 THEN H = 0: LINE (F * 15 + 380, G * 15 + 235)-(F * 15 + 395, G * 15 + 250), 0, BF
 W(F, G) = H
NEXT G, F
CALL Timing
CALL Arena2
END SUB

SUB Relief (Z, qqq)
IF Z = 1 THEN qqq = qqq + 1: GOTO 345
IF Z = 2 THEN qqq = qqq + 1: GOTO 456
IF Z = 3 THEN TXT$ = "ThImk  thinK  tHimk                  "
IF Z = 4 THEN TXT$ = "You could be the champion!!!  Or not."
IF Z = 5 THEN TXT$ = "You stink...                         "
IF Z = 6 THEN TXT$ = "TRY getting the code!!!!             "
LOCATE 27, 1: PRINT TXT$
EXIT SUB

345
R3 = INT(RND * 2) + 2
IF R3 = 2 THEN CALL Bonus(2)
IF R3 = 3 THEN CALL Bonus(3)
EXIT SUB

456
R3 = INT(RND * 2) + 1
IF R3 = 1 THEN CALL Bonus(1)
IF R3 = 2 THEN CALL Bonus(2)
END SUB

SUB ScoreAdd
FOR F = 0 TO 12: FOR G = 0 TO 11
 H = POINT(F * 15 + 101, G * 15 + 49)
 IF H > 0 AND H < 4 THEN CNT3 = CNT3 + 1
NEXT G, F
FOR F = 0 TO 12: FOR G = 0 TO 11
 H = POINT(F * 15 + 101, G * 15 + 236)
 IF H > 0 AND H < 4 THEN CNT = CNT + 1
NEXT G, F
FOR F = 0 TO 12: FOR G = 0 TO 11
 H = POINT(F * 15 + 381, G * 15 + 49)
 IF H > 0 AND H < 4 THEN CNT4 = CNT4 + 1
NEXT G, F
FOR F = 0 TO 12: FOR G = 0 TO 11
 H = POINT(F * 15 + 381, G * 15 + 236)
 IF H > 0 AND H < 4 THEN CNT2 = CNT2 + 1
NEXT G, F
Tim3 = 400 - (TIMER - TIM2)
Scr = 0: Scr2 = 0
Scr = (BM * 10000) + (TMth * 4000) + (CNT * 300) - (CNT3 * 20) - FIX(Tim3 / 10)
Scr2 = (BM2 * 10000) + (TMth2 * 4000) + (CNT2 * 300) - (CNT4 * 20) - FIX(Tim3 / 10)
LOCATE 27, 38: PRINT "<-SCORE->"
LOCATE 27, 22: PRINT Scr
LOCATE 27, 57: PRINT Scr2
CALL Winner
END SUB

SUB Strt
IF Plyr = 1 THEN
FOR ST = 1 TO 9 + Lvl
M = INT(RND * 11)
H = INT(RND * 4) + 8
C = INT(RND * 3) + 1
IF C = 1 THEN PUT (M * 15 + 100, H * 15 + 48), B1%, PSET
IF C = 2 THEN PUT (M * 15 + 100, H * 15 + 48), B2%, PSET
IF C = 3 THEN PUT (M * 15 + 100, H * 15 + 48), B3%, PSET
P(M, H) = C
IF AA = 1 THEN
IF C = 1 THEN PUT (M * 15 + 100, H * 15 + 220), B1%, PSET
IF C = 2 THEN PUT (M * 15 + 100, H * 15 + 220), B2%, PSET
IF C = 3 THEN PUT (M * 15 + 100, H * 15 + 220), B3%, PSET
L(M, H) = C
END IF
IF AA = 0 THEN AA = 1 ELSE AA = 0
NEXT ST
ELSE
FOR ST = 1 TO 29 + Lvl
M = INT(RND * 11)
H = INT(RND * 3) + 9
C = INT(RND * 3) + 1
IF C = 1 THEN PUT (M * 15 + 100, H * 15 + 48), B1%, PSET: PUT (M * 15 + 380, H * 15 + 48), B1%, PSET
IF C = 2 THEN PUT (M * 15 + 100, H * 15 + 48), B2%, PSET: PUT (M * 15 + 380, H * 15 + 48), B2%, PSET
IF C = 3 THEN PUT (M * 15 + 100, H * 15 + 48), B3%, PSET: PUT (M * 15 + 380, H * 15 + 48), B3%, PSET
P(M, H) = C: Q(M, H) = C
IF AA = 1 THEN
IF C = 1 THEN PUT (M * 15 + 100, H * 15 + 220), B1%, PSET
IF C = 2 THEN PUT (M * 15 + 100, H * 15 + 220), B2%, PSET
IF C = 3 THEN PUT (M * 15 + 100, H * 15 + 220), B3%, PSET
L(M, H) = C
END IF
IF AA = 0 THEN
IF C = 1 THEN PUT (M * 15 + 380, H * 15 + 220), B1%, PSET
IF C = 2 THEN PUT (M * 15 + 380, H * 15 + 220), B2%, PSET
IF C = 3 THEN PUT (M * 15 + 380, H * 15 + 220), B3%, PSET
W(M, H) = C
END IF
IF AA = 0 THEN AA = 1 ELSE AA = 0
NEXT ST
END IF
END SUB

SUB Super2
Mth = 0: Mth2 = 0: CN = INT(RND * 12): P(CN, 9) = 0: P(CN, 10) = 0: P(CN, 11) = 0
Q(CN, 9) = 0: Q(CN, 10) = 0: Q(CN, 11) = 0: CN = CN * 15 + 100
LINE (CN, 230)-(CN + 15, 230), 0: GET (CN, 183)-(CN + 15, 229), Spr%
LINE (CN + 280, 230)-(CN + 295, 230), 0: GET (CN + 280, 183)-(CN + 295, 229), Spr2%
FOR Y1 = 184 TO 354
LINE (CN, Y1 - 1)-(CN + 15, Y1 - 1), 0: PUT (CN, Y1), Spr%, PSET
LINE (CN + 280, Y1 - 1)-(CN + 295, Y1 - 1), 0: PUT (CN + 280, Y1), Spr2%, PSET
CLL = POINT(CN + 1, Y1 + 47): CL2 = POINT(CN + 281, Y1 + 47)
IF CLL > 0 OR CL2 > 0 THEN PUT (CN, Y1 + 1), Spr%, PSET: PUT (CN + 280, Y1 + 1), Spr2%, PSET: CALL Arena2: EXIT SUB
NEXT Y1
CALL Timing
CALL Arena2

END SUB

SUB Timing
Tim3 = 400 - (TIMER - TIM2)
IF Tim3 > 0 THEN LOCATE 6, 40: PRINT FIX(Tim3) ELSE LOCATE 6, 40: PRINT " 0 "
END SUB

SUB TryBkdrop
CLS
COLOR 8
FOR X = 2 TO 28 STEP 2: FOR A = 1 TO 77 STEP 5: LOCATE X, A: PRINT "T": NEXT A, X
FOR X = 27 TO 3 STEP -2: FOR A = 3 TO 79 STEP 5: LOCATE X, A: PRINT "T": NEXT A, X
FOR X = 2 TO 28 STEP 2: FOR A = 1 TO 77 STEP 5: LOCATE X, A + 1: PRINT "R": NEXT A, X
FOR X = 3 TO 27 STEP 2: FOR A = 3 TO 79 STEP 5: LOCATE X, A + 1: PRINT "O": NEXT A, X
FOR X = 28 TO 2 STEP -2: FOR A = 1 TO 77 STEP 5: LOCATE X, A + 2: PRINT "Y": NEXT A, X
FOR X = 3 TO 27 STEP 2: FOR A = 3 TO 79 STEP 5: LOCATE X, A + 2: PRINT "O": NEXT A, X: LOCATE 28, 76: PRINT "MP": COLOR 15

END SUB

SUB TwoPlayer
LINE (100, 60)-(280, 400), 0, BF: LINE (380, 60)-(560, 400), 0, BF
LINE (0, 0)-(639, 59), 0, BF: CALL Arena2
RANDOMIZE TIMER: CALL ZeroPoss
R = INT(RND * 3) + 1: Y = 48: Y2 = 48: X = 190: X2 = 470: Lvl = Lvl + 1: FlL = INT(RND * 0) + 1: TMth = 0: BM = 0: TMth2 = 0: BM2 = 0: Spd = 10
CALL Strt
COLOR 15: LOCATE 1, 1: PRINT "Press SPACEBAR to start CHALLENGE level"; Lvl; "...       ": BEEP: SLEEP
LOCATE 1, 1: PRINT "                                                   "
TIMER ON: TIM = TIMER: TIM2 = TIMER

23 DO
KP$ = INKEY$
21 SELECT CASE KP$
 CASE CHR$(0) + CHR$(75)
  C = (X - 100) / 15 - 1: D = (Y - 48) / 15
  IF C = -1 THEN C = 0
  IF P(C, D) = 1 THEN GOTO 23
  IF P(C, D) = 2 THEN GOTO 23
  IF P(C, D) = 3 THEN GOTO 23
  LINE (X, Y)-(X + 15, Y + 15), 0, BF: IF X > 100 THEN X = X - 15
 CASE "Q", "q"
  C = (X2 - 380) / 15 - 1: D = (Y2 - 48) / 15
  IF C = -1 THEN C = 0
  IF Q(C, D) = 1 THEN GOTO 23
  IF Q(C, D) = 2 THEN GOTO 23
  IF Q(C, D) = 3 THEN GOTO 23
  LINE (X2, Y2)-(X2 + 15, Y2 + 15), 0, BF: IF X2 > 380 THEN X2 = X2 - 15
 CASE "W", "w"
  C = (X2 - 380) / 15 + 1: D = (Y2 - 48) / 15
  IF D = 12 THEN D = 11
  IF Q(C, D) = 1 THEN GOTO 23
  IF Q(C, D) = 2 THEN GOTO 23
  IF Q(C, D) = 3 THEN GOTO 23
  LINE (X2, Y2)-(X2 + 15, Y2 + 15), 0, BF: IF X2 < 560 THEN X2 = X2 + 15
 CASE CHR$(0) + CHR$(77)
  C = (X - 100) / 15 + 1: D = (Y - 48) / 15
  IF D = 12 THEN D = 11
  IF P(C, D) = 1 THEN GOTO 23
  IF P(C, D) = 2 THEN GOTO 23
  IF P(C, D) = 3 THEN GOTO 23
  LINE (X, Y)-(X + 15, Y + 15), 0, BF: IF X < 265 THEN X = X + 15
END SELECT
 IF R = 1 THEN PUT (X, Y), B1%, PSET: PUT (X2, Y2), B1%, PSET
 IF R = 2 THEN PUT (X, Y), B2%, PSET: PUT (X2, Y2), B2%, PSET
 IF R = 3 THEN PUT (X, Y), B3%, PSET: PUT (X2, Y2), B3%, PSET
 IF R = 4 THEN PUT (X, Y), B4%, PSET: PUT (X2, Y2), B4%, PSET
FOR RT = 1 TO Spd * 100: NEXT RT: LINE (X, Y)-(X + 15, Y + 15), 0, BF: LINE (X2, Y2)-(X2 + 15, Y2 + 15), 0, BF
CALL Timing
IF Y < 209 THEN
 C = (X - 100) / 15: D = (Y - 48) / 15 + 1
 C2 = (X2 - 380) / 15: D2 = (Y2 - 48) / 15 + 1
 IF Q(C2, D2) > 0 THEN GOTO 22
 IF P(C, D) > 0 THEN GOTO 22
 Y2 = Y2 + 15: Y = Y + 15
 ELSE
22
 Z = R: A = (X - 100) / 15: B = (Y - 48) / 15: P(A, B) = R
 C = (X2 - 380) / 15: D = (Y2 - 48) / 15: Q(C, D) = Z
 IF R = 1 THEN PUT (X, Y), B1%, PSET
 IF R = 2 THEN PUT (X, Y), B2%, PSET
 IF Z = 1 THEN PUT (X2, Y2), B1%, PSET
 IF Z = 2 THEN PUT (X2, Y2), B2%, PSET
 IF Z = 3 THEN PUT (X2, Y2), B3%, PSET
 IF R = 3 THEN PUT (X, Y), B3%, PSET
 IF R = 4 THEN PUT (X, Y), B4%, PSET
 IF Z = 4 THEN PUT (X2, Y2), B4%, PSET: CALL Green2: CALL Super2
 Y = 48: X = 190: Y2 = 48: X2 = 470: R = INT(RND * 10) + 1
 IF R = 1 OR R = 2 OR R = 3 OR R = 4 THEN R = 1
 IF R = 5 OR R = 6 OR R = 7 THEN R = 2
 IF R = 8 OR R = 9 THEN R = 3
 IF R = 10 THEN R = 4
 IF POINT(X, Y) > 0 OR POINT(X2, Y2) > 0 THEN EXIT DO
 CALL Ok2
 END IF
IF Mth >= FlL OR Mth2 >= FlL THEN CALL Super2: CALL Ok3: CALL Ok2: CALL Arena2
IF Tim3 <= 0 THEN LOCATE 1, 1: PRINT "Challenge time Completed....": BEEP: SLEEP:  EXIT DO
LOOP
CALL ScoreAdd
CALL VSMatches

END SUB

SUB VSMatches
RANDOMIZE TIMER
LOCATE 1, 1: BEEP: INPUT "Player 1, type your name and press ENTER: ", Name1$
LOCATE 2, 1: BEEP: INPUT "Player 2, type your name and press ENTER: ", Name2$
IF Scr > Scr2 THEN Name1$ = Name1$ + ""
IF Scr < Scr2 THEN Name2$ = Name2$ + ""
Scr3 = Scr + Scr2
OPEN "c:\trytoovs.hgh" FOR APPEND AS #1
PRINT #1, Name1$; ","; Name2$; ","; Scr3; ","; DATE$
CLOSE #1

OPEN "C:\TRYTOOvs.HGH" FOR INPUT AS #1
OPEN "C:\TRY2vs.HGH" FOR APPEND AS #2
R = 0
DO
R = R + 1
LINE INPUT #1, A$
IF A$ = "" OR A$ = " " THEN GOTO 33
PRINT #2, A$
33 LOOP UNTIL EOF(1) OR R = 90
CLOSE #2: CLOSE #1
SHELL "CD C:\"
SHELL "ERASE TRYTOOvs.HGH"
SHELL "RENAME TRY2vs.HGH TRYTOOvs.HGH"

DIM N1$(0 TO 100): DIM N2$(0 TO 100): DIM S$(0 TO 100): DIM D$(0 TO 100)
Q = 0: QQ = 0
OPEN "c:\TRYTOOvs.HGH" FOR INPUT AS #1
OPEN "C:\TRY2vs.HGH" FOR APPEND AS #2
DO
Q = Q + 1
INPUT #1, N1$(Q), N2$(Q), S$(Q), D$(Q)
LOOP UNTIL EOF(1)
QQ = Q
FOR E1% = 1 TO Q
FOR E2% = E1% + 1 TO QQ
  s1 = VAL(S$(E1%))
  s2 = VAL(S$(E2%))
  IF s1 < s2 THEN
   SWAP N1$(E1%), N1$(E2%)
   SWAP N2$(E1%), N2$(E2%)
   SWAP S$(E1%), S$(E2%)
   SWAP D$(E1%), D$(E2%)
  END IF
NEXT E2%
NEXT E1%

W = 0
DO
W = W + 1
PRINT #2, N1$(W); ","; N2$(W); ","; S$(W); ","; D$(W)
LOOP UNTIL W = QQ
CLOSE #2: CLOSE #1
SHELL "CD C:\"
SHELL "ERASE TRYTOOVS.HGH"
SHELL "RENAME TRY2VS.HGH TRYTOOVS.HGH"

CLS : LINE (0, 0)-(639, 479), 15, B: LINE (3, 3)-(636, 476), 15, B
LOCATE 2, 28: PRINT "HIGHEST TRYTOO MATCH-UPS"
LOCATE 4, 12: PRINT "PLAYER1"
LOCATE 4, 30: PRINT "PLAYER2"
LOCATE 4, 53: PRINT "SCORE"
LOCATE 4, 70: PRINT "DATE"
X = 6: DO: LOCATE X, 2: PRINT X - 5: LOCATE X, 5: PRINT ".": X = X + 1: LOOP UNTIL X = 26

X = 6
OPEN "C:\TRYTOOVS.HGH" FOR INPUT AS #1
DO
INPUT #1, N1$, N2$, S$, D$
IF Name1$ = N1$ AND Scr3 = VAL(S$) THEN COLOR 15 ELSE COLOR 8
LOCATE X, 7: PRINT N1$
LOCATE X, 25: PRINT N2$
LOCATE X, 53: PRINT S$
LOCATE X, 67: PRINT D$
FOR I = 1 TO 1500: NEXT I
X = X + 1
LOOP UNTIL EOF(1) OR X = 26
CLOSE #1
COLOR 15
END SUB

SUB Winner
IF Scr > Scr2 THEN
 LOCATE 28, 22: PRINT "WINNER!"
END IF
IF Scr2 > Scr THEN
 LOCATE 28, 57: PRINT "WINNER!"
END IF

END SUB

SUB ZeroPoss
SHARED A, B
FOR A = 0 TO 12: FOR B = 0 TO 11: P(A, B) = 0: L(A, B) = 0: Q(A, B) = 0: W(A, B) = 0: NEXT B, A
END SUB

