Maybe you should visit http://www.cs.ualberta.ca/~games/poker/
Where they used to have a Java Poker Library (source) that would give you some idea of how many things are accomplished. Rich Halsey ----- Original Message ----- From: "Peder Jakobsen" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, March 07, 2004 11:35 PM Subject: JESS: Poker Problem Continued -- dealing random cards. > 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] > -------------------------------------------------------------------- > -------------------------------------------------------------------- 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] --------------------------------------------------------------------
