home *** CD-ROM | disk | FTP | other *** search
/ 100 Plus Great Games 2 / 100PLUSV2.BIN / games / BlackHole.dxr / 00066.ls < prev    next >
Encoding:
Text File  |  2002-01-25  |  657 b   |  25 lines

  1. on shuffle
  2.   templist1 = []
  3.   templist2 = []
  4.   repeat with rank in ["ace", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten", "jack", "queen", "king"]
  5.     repeat with suit in ["hearts", "clubs", "spades", "diamonds"]
  6.       if (rank = "ace") and (suit = "spades") then
  7.         next repeat
  8.       end if
  9.       templist1.add([#rank: rank, #suit: suit])
  10.     end repeat
  11.   end repeat
  12.   repeat while templist1.count > 0
  13.     tempholder = templist1[random(templist1.count)]
  14.     templist2.add(tempholder)
  15.     templist1.deleteOne(tempholder)
  16.   end repeat
  17.   return templist2
  18. end
  19.  
  20. on gotoit
  21.   global pootimer
  22.   pootimer.forget()
  23.   go("gameover")
  24. end
  25.