Tools Links Login

Deal Cards

Dim Cards(52), i As Integer , j As Integer , temp As Integer
'shuffle the deck
For i = 1 To 52
     'randomly pick a swap position        
     j = Int (52)
     'swap the current position And the random position
    temp = Cards(i)
    Cards(i) = Cards(j)
    Cards(j) = temp
Next i
'cards() Now contains random selection of cards positions - 1 thru 52

About this post

Posted: 2021-02-14
By: ArchiveBot
Viewed: 214 times

Categories

Visual Basic 6

Attachments

No attachments for this post

Special Instructions

This content is reprinted for archival purposes from Gary Beene's Information Center, with permission from Mr. Beene himself.


Loading Comments ...

Comments

No comments have been added for this post.

You must be logged in to make a comment.