mirror of
https://github.com/correl/mage.git
synced 2025-04-05 01:09:06 -09:00
updated classes and jars in test framework
This commit is contained in:
parent
86089f0fb9
commit
fc04cb2d22
7 changed files with 8 additions and 19 deletions
Mage.Tests
plugins
mage-player-ai-ma.jarmage-player-ai.jarmage-player-aimcts.jarmage-player-aiminimax.jarmage-player-human.jar
src/test/java/org/mage/test/player
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -27,23 +27,10 @@
|
|||
*/
|
||||
package org.mage.test.player;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Random;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import mage.Constants;
|
||||
import mage.Constants.Outcome;
|
||||
import mage.Constants.RangeOfInfluence;
|
||||
import mage.Constants.Zone;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.ActivatedAbility;
|
||||
import mage.abilities.Mode;
|
||||
import mage.abilities.Modes;
|
||||
import mage.abilities.TriggeredAbilities;
|
||||
import mage.abilities.TriggeredAbility;
|
||||
import mage.abilities.*;
|
||||
import mage.abilities.common.PassAbility;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.costs.mana.ManaCost;
|
||||
|
@ -63,7 +50,9 @@ import mage.players.Player;
|
|||
import mage.target.Target;
|
||||
import mage.target.TargetAmount;
|
||||
import mage.target.TargetCard;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -194,7 +183,7 @@ public class RandomPlayer extends ComputerPlayer<RandomPlayer> {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void selectAttackers(Game game) {
|
||||
public void selectAttackers(Game game, UUID attackingPlayerId) {
|
||||
//useful only for two player games - will only attack first opponent
|
||||
UUID defenderId = game.getOpponents(playerId).iterator().next();
|
||||
List<Permanent> attackersList = super.getAvailableAttackers(game);
|
||||
|
@ -214,7 +203,7 @@ public class RandomPlayer extends ComputerPlayer<RandomPlayer> {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void selectBlockers(Game game) {
|
||||
public void selectBlockers(Game game, UUID defendingPlayerId) {
|
||||
int numGroups = game.getCombat().getGroups().size();
|
||||
if (numGroups == 0) return;
|
||||
|
||||
|
|
|
@ -128,7 +128,7 @@ public class TestPlayer extends ComputerPlayer<TestPlayer> {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void selectAttackers(Game game) {
|
||||
public void selectAttackers(Game game, UUID attackingPlayerId) {
|
||||
UUID opponentId = game.getCombat().getDefenders().iterator().next();
|
||||
for (PlayerAction action: actions) {
|
||||
if (action.getTurnNum() == game.getTurnNum() && action.getAction().startsWith("attack:")) {
|
||||
|
@ -145,7 +145,7 @@ public class TestPlayer extends ComputerPlayer<TestPlayer> {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void selectBlockers(Game game) {
|
||||
public void selectBlockers(Game game, UUID defendingPlayerId) {
|
||||
UUID opponentId = game.getOpponents(playerId).iterator().next();
|
||||
for (PlayerAction action: actions) {
|
||||
if (action.getTurnNum() == game.getTurnNum() && action.getAction().startsWith("block:")) {
|
||||
|
|
Loading…
Add table
Reference in a new issue