Random numbers once Cards by HomerS3rd Nov 2012 4:03
|
---|
Summary If you want to shuffel cards, use this. Change "COUNT=10" in the number of cards you have/want. Hard to find on the internet, so made one myself for darkbasic classic. Description If you want to shuffel cards, use this. Change "COUNT" in the number of cards you have. Code ` This code was downloaded from The Game Creators ` It is reproduced here with full permission ` http://www.thegamecreators.com `********************* `**RANDOM COUNT ONCE** `********************* repeat COUNT=10 cls dim CARD(COUNT) for t=1 to COUNT start: CARD_CHOISE=rnd(COUNT-1)+1 for r=1 to t read CARD(r) if CARD(r)=CARD_CHOISE goto start endif next r CARD(t)=CARD_CHOISE next t for d=1 to COUNT print CARD(d) next d wait key undim CARD(COUNT) until escapekey()=1 end |