Hi, I'm continuing my quest for the JESS poker game, but (random) is not
doing it for me unless i can get a random number between 1 and 52.  Your
suggestions are most appreciated:

(clear)
(reset)
(watch all)

(deftemplate card
   "A Card in a Deck"
    (slot suit)
    (slot rank (type INTEGER))
    (slot player)
 )

(deftemplate deck (slot card))

(foreach ?suit (create$ Clubs Diamonds Hearts Spades)

     (foreach  ?rank (create$ 1 2 3 4 5 6 7 8 9 10 11 12 13)
     ;; assign each card to the dealer by default
     (assert (card (suit ?suit) (rank ?rank) (player dealer)))

 )

;; assign a card to a player by modifying a random fact
(modify 5 (player Joe))

;; now assign a random card to a player by modifying a random fact
;;  ??? help  ???

--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the list
(use your own address!) List problems? Notify [EMAIL PROTECTED]
--------------------------------------------------------------------

Reply via email to