All 1-character strings converted to primitives

"b" + "r" now changed to 'b' + 'w'.  It's more straight-forward, and may cause perfomance improvements - character primitives allocation is faster and less expensive than string creation.
This commit is contained in:
vraskulin 2017-01-27 15:57:10 +03:00
parent 31589778ca
commit f60ebfbb1f
451 changed files with 989 additions and 978 deletions

View file

@ -92,7 +92,7 @@ public class ActivateIfConditionActivatedAbility extends ActivatedAbilityImpl {
!condition.toString().startsWith("before")) {
sb.append("if ");
}
sb.append(condition.toString()).append(".");
sb.append(condition.toString()).append('.');
} else {
sb.append(" [Condition toSting() == null] ");
}

View file

@ -70,7 +70,7 @@ public class ChancellorAbility extends StaticAbility implements OpeningHandActio
@Override
public boolean askUseOpeningHandAction(Card card, Player player, Game game) {
return player.chooseUse(Outcome.PutCardInPlay, "Do you wish to reveal " + card.getIdName() + "?", this, game);
return player.chooseUse(Outcome.PutCardInPlay, "Do you wish to reveal " + card.getIdName() + '?', this, game);
}
@Override

View file

@ -78,7 +78,7 @@ public class PutCardIntoGraveFromAnywhereAllTriggeredAbility extends TriggeredAb
sb.append("your");
break;
default:
sb.append("a");
sb.append('a');
}
sb.append(" graveyard, ");
ruleText = sb.toString();

View file

@ -148,7 +148,7 @@ class PutIntoGraveFromAnywhereEffect extends ReplacementEffectImpl {
if (controller == null || object == null) {
return false;
}
if (!controller.chooseUse(outcome, new StringBuilder("Use effect of ").append(object.getLogName()).append("?").toString(), source, game)) {
if (!controller.chooseUse(outcome, new StringBuilder("Use effect of ").append(object.getLogName()).append('?').toString(), source, game)) {
return false;
}
}

View file

@ -98,7 +98,7 @@ class PactEffect extends OneShotEffect {
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId());
if (player != null) {
if (player.chooseUse(Outcome.Benefit, "Pay " + cost.getText() + "?", source, game)) {
if (player.chooseUse(Outcome.Benefit, "Pay " + cost.getText() + '?', source, game)) {
cost.clearPaid();
if (cost.pay(source, game, source.getSourceId(), source.getControllerId(), false, null)){
return true;