10REM PROGRAM PYRAMID
20REM By Leslie J. Fowl.
30MODE7:VDU23,1,0;0;0;0;
40CLS:PROCvdu:REPEAT:PRINTTAB(0,12);C
HR$131;"Do you want instructions ? (Y/N)
";
50G$=GET$:CLS:IF G$="N" THEN GOTO70
60PROCinstruct
70CHAIN "PYR"
80END
90:
100DEF PROCvdu
110VDU23,230,204,204,51,51,204,204,51,
51
120VDU23,231,8,28,62,127,62,28,8,0
130VDU23,232,54,127,127,127,62,28,8,0
140VDU23,233,8,28,28,107,127,107,8,28
150VDU23,234,8,28,62,127,127,127,28,62
160VDU23,235,1,3,3,7,7,15,15,31
170VDU23,236,0,128,128,192,192,224,224
,240
180VDU23,237,31,15,15,7,7,3,3,1
190VDU23,238,240,224,224,192,192,128,1
28,0
200VDU23,239,24,124,126,255,255,255,25
5,255
210VDU23,240,48,124,252,254,254,254,25
4,254
220VDU23,241,255,127,127,63,31,15,7,3
230VDU23,242,254,252,252,248,240,224,1
92,128
240VDU23,243,3,7,15,15,15,7,59,125
250VDU23,244,128,192,224,224,224,192,1
84,124
260VDU23,245,255,255,255,125,57,1,3,7
270VDU23,246,254,254,254,124,56,0,128,
192
280VDU23,247,1,3,7,15,15,31,31,63
290VDU23,248,0,128,192,224,224,240,240
,248
300VDU23,249,63,63,31,31,13,1,3,7
310VDU23,250,248,248,240,240,96,0,128,
192
320ENDPROC
330:
340DEF PROCintro
350X%=10:FOR Y%=6 TO 7
360PRINTTAB(X%,Y%);CHR$133;CHR$141"Wel
come to"
370NEXT
380X%=7:FOR Y%=9 TO 10
390PRINTTAB(X%,Y%);CHR$131;CHR$141"PYR
AMID PATIENCE"
400NEXT
410X%=13:FOR Y%=12 TO 13
420PRINTTAB(X%,Y%);CHR$134;CHR$141"By"
:NEXT
430X%=5:FOR Y%=16 TO 17
440PRINTTAB(X%,Y%);CHR$130;CHR$141"Les
lie 'LEE' J. Fowl."
450NEXT:PROCvdu
460REPEAT:PRINTTAB(0,24);CHR$129;"HIT
SPACE when ready to play....";:UNTILGET=
32
470ENDPROC
480:
490DEF PROCinstruct
500CLS:VDU28,0,4,39,0
510FOR Y%=1 TO 2
520PRINTTAB(8,Y%);CHR$133;CHR$141;"Pyr
amid Patience":NEXT
530PRINTTAB(6,3);CHR$134;"By Leslie 'L
EE' J. Fowl."
540VDU28,0,24,39,23
550PRINTTAB(8);CHR$130;"Press shift fo
r more"
560VDU28,0,22,39,4,14
570PRINT'CHR$131;"The pyramid is forme
d by a deal of 28"'CHR$131"cards, With a
King always at the apex."
580PRINTCHR$131;"The stock is located
in the top right"'CHR$131"hand corner wi
th the first card being"'CHR$131"dealt,
The waste pile is used for the"'CHR$131"
discarded cards from the Stock pile."
590PRINT'CHR$131;"At the start of the
game the stock card"CHR$131;"and cards i
n row six only are available"CHR$131"and
they are removed in pairs that"'CHR$131
"total thirteen, Once removed they"'CHR$
131"are no longer in play."
600PRINTCHR$131;"The cards in the uppe
r rows become"'CHR$131;"available when t
he two adjacent cards"'CHR$131;"in the r
ow beneath them are removed."
610PRINTCHR$131;"Available cards in th
e table can be"'CHR$131;"paired with one
other if their total"'CHR$131;"pip valu
e is thirteen."
620IF INKEY(-1)CLS
630PRINTCHR$131;"The stock is dealt on
e card at a time"'CHR$131;"and can be pa
ired with an other if the"'CHR$131;"tota
l is thirteen. The stock is dealt"'CHR$1
31;"automaticaly when a card is removed"
640PRINTCHR$131;"from the stock pile,
Or a manual deal"'CHR$131;"is made using
the";CHR$133"'@'";CHR$131;"key followed
by"'CHR$131;"return."
650PRINT'CHR$131;"If a card in the Was
te pile + a card "'CHR$131;"in the Stock
or pyramid total thirteen"'CHR$131;"The
n both of these may also be removed"'CHR
$131"by typing"
660PRINTCHR$133;"'W' <RETURN> + 'S' <R
ETURN>. or the "'CHR$133;"cards co-ordin
ates"
670PRINT'CHR$131;"At any time during t
he game the card"'CHR$131;"status may be
viewed by pressing"'CHR$133;"'T' <RETUR
N>."
680PRINT'':IF INKEY(-1)CLS
690PRINT'CHR$131;"Typing"CHR$133;"'Q'"
CHR$131"will abandon the game and"'CHR$1
31;"reveal the status as above"
700PRINT'CHR$131;"Enter the cards that
are to be removed"'CHR$131;"by entering
its co-ordinates"'CHR$131;"as row and c
olumn i.e.";CHR$133;"6G <RETURN>."''
710PRINT'CHR$134"The game is won only
when all the of"'CHR$134"the cards excep
t the KING at the top "'CHR$134"of the p
yramid have been removed."'CHR$134"Inclu
ding both Waste & Stock Piles."
720PRINT''''':IF INKEY(-1) CLS
730PRINT'CHR$130;CHR$141;"Card Values
:-"
740PRINTCHR$130;CHR$141;"Card Values :
-"
750PRINT'CHR$130;"Ace = 1"
760PRINTCHR$130;"Jack = 11"
770PRINTCHR$130;"Queen = 12"
780PRINTCHR$130;"King = 13 ( removed
singly )"
790PRINT'CHR$130;"All other cards as f
ace value"
800PRINT''" The only rule is:-"''CHR$1
33"If it's legal you can do it....."
810PRINT'" Hint:-"'CHR$133"Don't let t
he waste pile get too big.."
820VDU28,0,24,39,23
830PRINTTAB(8);CHR$134;"Press SPACE to
play.....":REPEAT UNTIL GET=32
840VDU22,7:ENDPROC