Subject: Dynamic Declaration of Atoms

From: "Justice, Randy -CONT" <[email-masked]>
Date: Tue, 29 Aug 2000 13:55:40 -0500

Hi.

I'm trying to learn Prolog.  I'm trying to start simple..  I am in the
process of reading a book and an online tutorial.

I'm trying to do some "card gaming".  
I have a structure called deck ( a simple order deck of card)

/* Structure of Deck. 
   Face Card.
   Suit.
   Numeric value.
*/

deck([[a,s,1],[2,s,2],[3,s,3],[4,s,4],....]).

I want to create a rule to randomly pull a card from the deck and place it
in a stack/pile (there are 7 stacks/pile).

It's not a problem to get prolog to get a random card. I created a rule
called "get_card".  My problem is how to create dynamic "stack/pile" where
is visible outside the rule.  I want anothor rule to see the "stack/pile".

Thanks in Advance for any help.

Randy