Exemple #1
0
 @Override
 public void setExpansionSetCodeForImage(String code) {
   super.setExpansionSetCodeForImage(code);
   if (getOriginalExpansionSetCode() != null && getOriginalExpansionSetCode().equals("KLD")) {
     this.setTokenType(RandomUtil.nextInt(3) + 1);
   }
 }
Exemple #2
0
 public void setExpansionSetCodeForImage(String code) {
   if (availableImageSetCodes.size() > 0) {
     if (availableImageSetCodes.contains(code)) {
       setOriginalExpansionSetCode(code);
     } else {
       // we should not set random set if appropriate set is already used
       if (getOriginalExpansionSetCode() == null
           || getOriginalExpansionSetCode().isEmpty()
           || !availableImageSetCodes.contains(getOriginalExpansionSetCode())) {
         setOriginalExpansionSetCode(
             availableImageSetCodes.get(RandomUtil.nextInt(availableImageSetCodes.size())));
       }
     }
   } else {
     if (getOriginalExpansionSetCode() == null || getOriginalExpansionSetCode().isEmpty()) {
       setOriginalExpansionSetCode(code);
     }
   }
   setTokenDescriptor();
 }