Eliminate
🧩 Syntax:
public void Eliminate(Damageable f) {
int x = (int) f.getLocation().getX();
int y = (int) f.getLocation().getY();
ArrayList<Champion> temp = new ArrayList<Champion>();
if (f instanceof Champion) {
getPlayer((Champion) f).getTeam().remove(f);
((Champion) f).setCondition(Condition.KNOCKEDOUT);
while (!turnOrder.isEmpty()) {
Champion c = (Champion) turnOrder.remove();
if (c != f) {
temp.add(c);
}
}
while (!temp.isEmpty()) {
turnOrder.insert(temp.remove(0));
}
}
board[x][y] = null;
}didodada94
Member