mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 02:30:08 -08:00
tests: improved testable dialogs (added source code ref in result table for better IDE navigation, part of #13643, #13638);
This commit is contained in:
parent
4f8eb30e4c
commit
d893d52190
21 changed files with 127 additions and 49 deletions
|
|
@ -148,6 +148,12 @@ public class ComputerPlayer extends PlayerImpl {
|
|||
log.debug("choose: " + outcome.toString() + ':' + target.toString());
|
||||
}
|
||||
|
||||
// choose itself for starting player all the time
|
||||
if (target.getMessage(game).equals("Select a starting player")) {
|
||||
target.add(this.getId(), game);
|
||||
return true;
|
||||
}
|
||||
|
||||
boolean isAddedSomething = false; // must return true on any changes in targets, so game can ask next choose dialog until finish
|
||||
|
||||
// controller hints:
|
||||
|
|
|
|||
|
|
@ -297,7 +297,7 @@ public class HumanPlayer extends PlayerImpl {
|
|||
return;
|
||||
}
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Setting game priority for " + getId() + " [" + DebugUtil.getMethodNameWithSource(1) + ']');
|
||||
logger.debug("Setting game priority for " + getId() + " [" + DebugUtil.getMethodNameWithSource(1, "method") + ']');
|
||||
}
|
||||
game.getState().setPriorityPlayerId(getId());
|
||||
}
|
||||
|
|
@ -328,7 +328,7 @@ public class HumanPlayer extends PlayerImpl {
|
|||
while (loop) {
|
||||
// start waiting for next answer
|
||||
response.clear();
|
||||
response.setActiveAction(game, DebugUtil.getMethodNameWithSource(1));
|
||||
response.setActiveAction(game, DebugUtil.getMethodNameWithSource(1, "method"));
|
||||
game.resumeTimer(getTurnControlledBy());
|
||||
responseOpenedForAnswer = true;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue