§ Игра Пасьянс: турецкий платок

Были времена, когда я не мог своими собственными пальцами набрать эту программу на Бейсике по той причине, что я не мог ее набрать из-за того, что у меня компа не было. Но сейчас то я могу и сделаю. Так что пришло время! Но я модифицировал эту программу.
COLOR 0, 7
CLS
RANDOMIZE TIMER

H = 0
M = 4
K = 13

DIM M$(M), K$(K), B$(5, 9), N(9), K(M * K), J(1)
DATA 50,51,52,53,54,55,56,57,88,66,68,75,65
DATA 3,4,5,6

PRINT "Turkish scarf. Press column number (0-9) or S-STOP"
PRINT

FOR I = 1 TO K: READ A: K$(I) = CHR$(A): NEXT
FOR I = 1 TO M: READ A: M$(I) = CHR$(A): NEXT

' Count cards in stack
FOR J = 0 TO 9
  PRINT " "; J;
  IF J <= 1 THEN N(J) = 5 ELSE N(J) = 4
NEXT

' Show Trumana
PRINT
FOR I = 0 TO 5
  FOR J = 0 TO 9

    ' Select next random card and make it busy
    DO: V = 1 + INT(M * K * RND(1)): LOOP UNTIL K(V) = 0: K(V) = 1

    N = INT(V - K * INT((V - 1) / K))
    B$(I, J) = K$(N)
    PRINT "  "; K$(N); M$(1 + INT((V - 1) / K));

    ' Exit from 52-nd card
    IF I = 5 AND J = 1 THEN J = 9

  NEXT
  PRINT
NEXT

' GAME MODE: On
' -------------

DO

  DO

    PLAY "L16 BC"

    ' Select two card
    FOR I = 0 TO 1

      DO

        DO: A$ = INKEY$: LOOP UNTIL A$ = "S" OR A$ = "s" OR A$ >= "0" AND A$ <= "9":
        J(I) = VAL(A$)
        IF A$ = "S" OR A$ = "s" THEN LOCATE 13, 37: PRINT "Game Over": PLAY "CDEFGAB": END

        ' Arrow selected row
        LOCATE N(J(I)) + 5, 3 + J(I) * 4: PRINT CHR$(24);

      LOOP WHILE N(J(I)) = -1

    NEXT

    ' Clear arrow
    FOR I = 0 TO 1: LOCATE N(J(I)) + 5, 4 * J(I) + 3: PRINT " ": NEXT

  ' Cards not must be one suit or different value
  LOOP WHILE J(0) = J(1) OR B$(N(J(0)), J(0)) <> B$(N(J(1)), J(1))

  ' Delete cards
  FOR I = 0 TO 1

    LOCATE N(J(I)) + 4, 4 * J(I) + 2: PRINT "    "
    N(J(I)) = N(J(I)) - 1

  NEXT

  H = H + 2
  LOCATE 11, 1: PRINT USING "Getted ## cards"; H: PLAY "CDCD"

LOOP UNTIL H = 52

' Turkish Rondo: Gangsta V.MOZART
' -------------------------------
PLAY "T120 ML L16 O2 BAG#A>C4 DC<B>CE4"
PLAY "O3 FED#EBAG#ABAG#A>C4 L8 AB>C<BAG#AEFDC4<B4A4"
PLAY "O3 AB>C#4<AB>C#<BAG#F#G#ABG#EAB>C#4<AB>C#<BAG#F#BG#EA.P16"
PLAY "O3 AB>C#4<AB>C#<BAG#F#G#ABG#EAB>C#4<AB>C#<BAG#F#BG#EA4"
Snimok_ekrana_2024-05-09_11-13-49.png