Added WARNING to messages indicating that computation of possible choices is taking too long

master
melvin 2011-06-23 13:03:06 +08:00
parent d5a6ca83a5
commit 807e9210e1
2 changed files with 3 additions and 3 deletions

View File

@ -31,7 +31,7 @@ color_choice_foreground=00,00,FF
color_common_foreground=
color_uncommon_foreground=
color_rare_foreground=
color_choice=FF,DE,AD,75
color_choice=00,FF,00,30
color_combat_choice=FF,00,00,70
color_selected_player=00,40,00
color_game_border=C0,B0,A0,40

View File

@ -115,7 +115,7 @@ public class MagicEvent implements MagicCopyable {
final List<Object[]> choices = choice.getArtificialChoiceResults(game,this,player,source);
final long time = System.currentTimeMillis() - start;
if (time > 2000) {
System.err.println("ACR: " + choice.getDescription() + description + " time: " + time);
System.err.println("WARNING. ACR: " + choice.getDescription() + description + " time: " + time);
}
return choices;
}
@ -125,7 +125,7 @@ public class MagicEvent implements MagicCopyable {
final Object[] res = choice.getSimulationChoiceResult(game,this,player,source);
final long time = System.currentTimeMillis() - start;
if (time > 2000) {
System.err.println("RCR: " + choice.getDescription() + description + " time: " + time);
System.err.println("WARNING. RCR: " + choice.getDescription() + description + " time: " + time);
}
return res;
}