
-----------------------------------
TheFerret
Wed Mar 31, 2004 12:58 pm

Card Games
-----------------------------------
I am making an Euchre game and I am trying to make sure that all cards that are delt are different and I found a way but it is very un-effiecnt and she told me to use parrallel arrays and to have first one generate the num and second one to make sure it is different by using boolean but I am not sure how to do it and I can't get it to work...


var fullcards : array 1 .. 24 of int


var temp : array 1 .. 24 of boolean
for i : 1 .. 24
    temp (i) := false
end for
for i : 1 .. 24
    loop
        fullcards (i) := Rand.Int (1, 24)
        num := fullcards (i)
        if num >= 1 or num 