From Randy.Justice@cnet.navy.mil  Tue Aug 29 20:54:09 2000
Received: from smtp.cnet.navy.mil (smtp.cnet.navy.Mil [160.125.64.11])
	by swi.psy.uva.nl (8.9.3/8.9.3) with ESMTP id UAA22141
	for <prolog@swi.psy.uva.nl>; Tue, 29 Aug 2000 20:54:08 +0200 (MET DST)
Received: from penx68322m1.cnet.navy.mil (pens0394.cnet.navy.Mil [160.125.210.190])
	by smtp.cnet.navy.mil (8.8.6 (PHNE_17190)/8.8.6) with ESMTP id NAA25049
	for <prolog@swi.psy.uva.nl>; Tue, 29 Aug 2000 13:53:39 -0500 (CDT)
Received: by pens0394.cnet.navy.Mil with Internet Mail Service (5.5.2650.21)
	id <RYNW0ZGG>; Tue, 29 Aug 2000 13:55:41 -0500
Message-ID: <B4CA1F5D8D23D411ADC7009027E791BF1DF4C1@pens0394.cnet.navy.Mil>
From: "Justice, Randy -CONT" <Randy.Justice@cnet.navy.mil>
To: "Prolog@Swi. Psy. Uva. Nl (E-mail)" <prolog@swi.psy.uva.nl>
Subject: Dynamic Declaration of Atoms
Date: Tue, 29 Aug 2000 13:55:40 -0500
Return-Receipt-To: "Justice, Randy -CONT" <Randy.Justice@cnet.navy.mil>
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2650.21)
Content-Type: text/plain;
	charset="iso-8859-1"


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 

 

