Shuffling cards and assigning them to user and computer in android development
<p>I am creating a basic top trumps app in android development. I only need 6 top trumps card which have been made by using a database. I already have the code for this and have successfully created the cards. </p>

<p>I am stuck on this bit</p>

<p>When the user selects Play you should randomly assign half of the cards in the database to the human player, and half of the cards to the computer.</p>

<p>And was wondering if anyone had any ideas on how to do this? Thanks everyone.</p>

<p><strong>UPDATE</strong></p>

<p>I have tried doing this</p>

<pre><code>ArrayList&lt;Integer&gt; cards = new ArrayList&lt;Integer&gt;();
for(int i=1;i&lt;=6;i++)
{
this.cards.add(i);
}
Collections.shuffle(this.cards);
</code></pre>

<p>To shuffle the cards but I'm unsure on how to assign the computer and user the cards. </p>
