mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
cardpool won't add 0 or negative number or any card
This commit is contained in:
@@ -32,6 +32,7 @@ public final class CardPool extends CardPoolView {
|
||||
// Cards manipulation
|
||||
public void add(final CardPrinted card) { add(card, 1); }
|
||||
public void add(final CardPrinted card, final int amount) {
|
||||
if (amount <= 0) { return; }
|
||||
cards.put(card, count(card) + amount);
|
||||
isListInSync = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user