refactor : removed all instances of new Random() and replaced with RandomUtil for a ThreadLocal randomizer

This commit is contained in:
ingmargoudt 2016-09-05 15:03:47 +02:00
parent f2cc8d4571
commit e2a479255a
51 changed files with 173 additions and 133 deletions

View file

@ -38,6 +38,7 @@ import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.constants.CardType;
import mage.constants.Zone;
import mage.util.RandomUtil;
/**
*
@ -69,10 +70,10 @@ public class ClueArtifactToken extends Token {
public void setExpansionSetCodeForImage(String code) {
super.setExpansionSetCodeForImage(code);
if (getOriginalExpansionSetCode().equals("SOI")) {
this.setTokenType(new Random().nextInt(6) + 1); // 6 different images
this.setTokenType(RandomUtil.nextInt(6) + 1); // 6 different images
}
if (getOriginalExpansionSetCode().equals("EDM")) {
this.setTokenType(new Random().nextInt(6) + 1); // 6 different images
this.setTokenType(RandomUtil.nextInt(6) + 1); // 6 different images
}
}