mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 04:52:07 -08:00
* Reverted the library quick fix for random because RandomUtil works now.
This commit is contained in:
parent
eae53c0cfc
commit
445a8a242e
1 changed files with 2 additions and 3 deletions
|
|
@ -38,13 +38,13 @@ import java.util.HashSet;
|
|||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Random;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import mage.cards.Card;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.game.Game;
|
||||
import mage.util.RandomUtil;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -52,7 +52,6 @@ import mage.game.Game;
|
|||
*/
|
||||
public class Library implements Serializable {
|
||||
|
||||
private static Random rnd = new Random();
|
||||
private boolean emptyDraw;
|
||||
private final Deque<UUID> library = new ArrayDeque<>();
|
||||
private final UUID playerId;
|
||||
|
|
@ -75,7 +74,7 @@ public class Library implements Serializable {
|
|||
public void shuffle() {
|
||||
UUID[] shuffled = library.toArray(new UUID[0]);
|
||||
for (int n = shuffled.length - 1; n > 0; n--) {
|
||||
int r = rnd.nextInt(n);
|
||||
int r = RandomUtil.nextInt(n);;
|
||||
UUID temp = shuffled[n];
|
||||
shuffled[n] = shuffled[r];
|
||||
shuffled[r] = temp;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue