mirror of
https://github.com/correl/mage.git
synced 2024-11-15 03:00:16 +00:00
Test framework: added attached info in show command;
This commit is contained in:
parent
3d70dadc22
commit
886f3d39f8
1 changed files with 3 additions and 2 deletions
|
@ -712,7 +712,7 @@ public class TestPlayer implements Player {
|
|||
// show battlefield
|
||||
if (params[0].equals(SHOW_COMMAND_BATTLEFIELD) && params.length == 1) {
|
||||
printStart(action.getActionName());
|
||||
printPermanents(game.getBattlefield().getAllActivePermanents(computerPlayer.getId()));
|
||||
printPermanents(game, game.getBattlefield().getAllActivePermanents(computerPlayer.getId()));
|
||||
printEnd();
|
||||
actions.remove(action);
|
||||
wasProccessed = true;
|
||||
|
@ -816,7 +816,7 @@ public class TestPlayer implements Player {
|
|||
}
|
||||
}
|
||||
|
||||
private void printPermanents(List<Permanent> cards) {
|
||||
private void printPermanents(Game game, List<Permanent> cards) {
|
||||
System.out.println("Total permanents: " + cards.size());
|
||||
|
||||
List<String> data = cards.stream()
|
||||
|
@ -824,6 +824,7 @@ public class TestPlayer implements Player {
|
|||
+ " - " + c.getPower().getValue()
|
||||
+ "/" + c.getToughness().getValue()
|
||||
+ ", " + (c.isTapped() ? "Tapped" : "Untapped")
|
||||
+ (c.getAttachedTo() == null ? "" : ", attached to " + game.getPermanent(c.getAttachedTo()).getIdName())
|
||||
))
|
||||
.sorted()
|
||||
.collect(Collectors.toList());
|
||||
|
|
Loading…
Reference in a new issue