Skip to content

Instantly share code, notes, and snippets.

@Saafan
Last active March 27, 2020 16:34
Show Gist options
  • Save Saafan/0f54d9974e51b78ca9f80f02ab72a90f to your computer and use it in GitHub Desktop.
Save Saafan/0f54d9974e51b78ca9f80f02ab72a90f to your computer and use it in GitHub Desktop.
if (!oppField.isEmpty())
for (int i = 0; i < oppField.size(); i++) {
Minion m = oppField.get(i);
if (!m.isDivine()) {
if (m.getCurrentHP() - 4 <= 0) {
oppField.remove(m);
i--;
}
else
m.setCurrentHP(m.getCurrentHP() - 4);
} else
m.setDivine(false);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment