home *** CD-ROM | disk | FTP | other *** search
- on exitFrame me
- global scount, tcount, stock, firstSprite, first_counter, second_counter, tableau, objcounter, card, fcount, foundation, equal_value, garbage, points
- first_counter = 1
- second_counter = 7
- stock = new(script("stock"), shuffle())
- tableau = [:]
- objcounter = 0
- card = [:]
- firstSprite = []
- fcount = 1
- foundation = [:]
- equal_value = 0
- garbage = []
- points = 0
- scount = 1
- tcount = 1
- end
-
- on shuffle
- templist1 = []
- templist2 = []
- repeat with rank in ["ace", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten", "jack", "queen", "king"]
- repeat with suit in ["hearts", "clubs", "spades", "diamonds"]
- templist1.add([#rank: rank, #suit: suit])
- end repeat
- end repeat
- repeat while templist1.count > 0
- tempholder = templist1[random(templist1.count)]
- templist2.add(tempholder)
- templist1.deleteOne(tempholder)
- end repeat
- return templist2
- end
-