%OP%PL64
%OP%TM1
%OP%BM1
%OP%LM5
%OP%HE/%H2%Z88 Users' Club Software Library%H2%/
%OP%FO/%H2%Z182%H2%//@P@/
%CO:A,10,70%%C%%H1%%H2%Documentation for the Z88 Card Game Utility%H2%%H1%


This utility is merely a few lines of BASIC to incorporate into your 
programs. It effectively adds various (card-specific) keywords to the 
BASIC. (It doesn't really do this, it just provides some readymade 
procedures as described below.


%H2%PROC_BACK (x,y)%H2%      This will draw the back of a card at coordinates 
x,y. It has nothing to do with any special cards, and the computer 
will have no record of a card being there. This is used most for just 
drawing the back of a card (ie. to represent a deck, or to display to 
show it's a card game).

%H2%PROC_DEAL (way$,x,y)%H2% This procedure will deal the next card in the 
deck at coordinates x,y. If way$="U", it will be dealt face-up. If it 
is "D", it will be dealt face-down.

%H2%PROC_DECK (type$)%H2%    This is the procedure to easily create a deck. 
The valid options for type$ are "N" (normal), "P" (pinnochle), and 
"J" (add jokers). "J" can be used in combination with "N" or "P", but 
don't use "N" with "P". Also, since this procedure uses some crucial 
screen maintenance DIM's, USE THIS PROCEDURE ONLY ONCE PER GAME. To 
change the deck later, or to create your own (ie. no sevens or 
sixes), use this format:
card values: A 2 3 4 5 6 7 8 9 0 J Q K ? (? is joker)
suits: S H D C
The cards are "stored" in a variable called DECK$ in a sequence like 
AS4D??8C... etc. and the first one in line is the next one to be 
dealt.

%H2%PROC_FLIP (x,y)%H2%      This procedure will flip the card at coordinates 
x,y. If it is face-down, it will end up face-up, and if it starts 
face-up, it ends up face-down. If there is no card there, nothing 
happens.

%H2%PROC_MOVE (x1,y1,x2,y2)%H2%     This command will move the card from 
coordinates x1,y1 to x2,y2. The orientation (ie. up or down) is 
preserved.

%H2%PROC_SHUFFLE (show$,x,y)%H2%    This shuffles the deck (created by 
PROC_DECK or some other manner). Show$ can be either "Y" or "N". If 
it is "Y", cards will be shown "shuffling" as the deck is shuffled. 
The cards will be shown at coordinates x,y. This is slower than "N", 
which doesn't draw the cards. Entering "N" will instead, at x,y, say 
"Now shuffling" and then "Done shuffling". However, if x is greater 
than 79, the computer will just shuffle and it won't draw or print 
anything anywhere.

%P0%
%H2%PROC_WIPE (x,y)%H2%      This will erase the card at x,y -- whether it is 
face down or face up. The computer will lose all track of it. It is 
the responsibility of your program to keep track of these cards (via 
CARD$(x,y)) if necessary. This procedure also will not handle erasing 
a card that is in the bottom of an overlapping stack without also 
erasing portions of the other cards; again, if this is needed in your 
programs, it's the responsibility of your programs to do it. (The 
second of these "inadequacies" also pertains to PROC_MOVE.

%H2%CARD$ (x,y)%H2%          Using this variable like a function (ie. PRINT 
CARD$(x,y)), you can find out what card is at x,y and whether it's 
face down or face up.

Please feel free to use this utility in all your exciting card game 
programming. It should be relatively easy to convert basic BASIC card 
games to exciting Z88 graphics -- I've started on a couple, but 
haven't had time yet to finish.
 
Curtis W. Claar
(307) 766-7026 (fax or voice)
%CO:B,12,60%%CO:C,12,48%%CO:D,12,36%%CO:E,12,24%%CO:F,12,12%