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

@ -33,6 +33,7 @@ import java.util.List;
import java.util.Random;
import mage.MageInt;
import mage.constants.CardType;
import mage.util.RandomUtil;
/**
*
@ -62,7 +63,7 @@ public class SoldierToken extends Token {
public void setExpansionSetCodeForImage(String code) {
super.setExpansionSetCodeForImage(code);
if (getOriginalExpansionSetCode().equals("THS")) {
this.setTokenType(new Random().nextInt(2) + 1);
this.setTokenType(RandomUtil.nextInt(2) + 1);
}
}