Re: Deck of Cards Question...
Hello Ck,
One way to handle these kinds of problems is to
use the 'pass the buck' method: pass the variables to the
function, return the same variables, altered by the function's
routines. This achieves encapsulation at the cost of an added
global function name to the program (usually very tolerable).
global function shuffle(sequence deck)
--pass deck to be shuffled
--place shuffle routine here:
--
return deck --returns shuffled deck
end function
Good luck with it.
--Al
|
Not Categorized, Please Help
|
|