Path: utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!mcgill-vision!bloom-beacon!snorkelwacker!think!samsung!umich!mailrus!ncar!boulder!rieman From: rieman@boulder.Colorado.EDU (John Rieman) Newsgroups: comp.sys.mac.hypercard Subject: Re: shuffling a stack Message-ID: <16637@boulder.Colorado.EDU> Date: 7 Feb 90 03:06:37 GMT References: <1990Feb6.193117.8068@ux1.cso.uiuc.edu> Sender: news@boulder.Colorado.EDU Reply-To: rieman@boulder.Colorado.EDU (John Rieman) Organization: University of Colorado, Boulder Lines: 17 In article <1990Feb6.193117.8068@ux1.cso.uiuc.edu> gphg1125@uxa.cso.uiuc.edu (Glenn P Hoetker) writes: >Is there a simple command that would shuffle the cards in a stack so that they >were in a random order? If you want any kind of performance at all, you'd be better off to shuffle a list of pointers to cards. Of course, that means you have to build a navigation routine that uses the pointers. I've tried some schemes for shuffling lines in a field. One way is to use the random function to select a line in sourceField, then put that line after destinationField (and delete it in sourceField). When there are no more lines to move, destinationField is a scrambled version of sourceField. The speed is not blinding, though. -john rieman@boulder.colorado.edu U. of Colo.