public Card chooseTarget(int player, Card attacker) { BoardSide current = getBoardFromPlayer(player); BoardSide other = player == 1 ? p2Board : p1Board; Card target; if (attacker.getName().Equals("Zapp Slywick")) { var targets = other.getLowestAtks(this); printDebugMessage("Zapp targets:", OutputPriority.INTENSEDEBUG); foreach (Card c in targets) { printDebugMessage(c.getReadableName(), OutputPriority.INTENSEDEBUG); } return(targets[getRandomNumber(0, targets.Count)]); } List <Card> taunts = other.getTaunts(); if (taunts.Count == 0) { int res = getRandomNumber(0, other.Count); target = other[res]; } else { target = taunts[getRandomNumber(0, taunts.Count)]; } return(target); }