Your shuffling algorithm looks really inefficient and is almost certainly not truly random. You should implement a
Knuth Shuffle which shuffles the whole deck before any cards are dealt and you can then just deal from the top of the deck (i.e. deck[0], deck[1]...).