java - Shuffling a deck of cards - array or stack? -


im planning develop simple card game on android-java, in app shuffle cards wonder best way store deck of cards in array or in stack..? problem stack dont know how shuffle it.

i believe trick stack:

stack<card> deck = new stack<>(); // add card types deck... collections.shuffle(deck); 

Comments

Popular posts from this blog

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

c++ - OpenMP unpredictable overhead -

javascript - Wordpress slider, not displayed 100% width -