Allow a particular random object to be specified when shuffling the deck.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@760 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
@@ -23,6 +23,7 @@ package com.threerings.parlor.card.data;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import com.threerings.util.StreamableArrayList;
|
||||
|
||||
@@ -83,6 +84,14 @@ public class Deck extends StreamableArrayList<Card>
|
||||
Collections.shuffle(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Shuffles the deck.
|
||||
*/
|
||||
public void shuffle (Random r)
|
||||
{
|
||||
Collections.shuffle(this, r);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deals a hand of cards from the deck.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user