MCPcopy Create free account
hub / github.com/Card-Forge/forge / removeAnteCard

Method removeAnteCard

forge-core/src/main/java/forge/deck/Deck.java:209–220  ·  view source on GitHub ↗

Removes a card from any section it's found in, prioritizing the sideboard over other sections.

(PaperCard card)

Source from the content-addressed store, hash-verified

207 * Removes a card from any section it's found in, prioritizing the sideboard over other sections.
208 */
209 public void removeAnteCard(PaperCard card) {
210 if (has(DeckSection.Sideboard) && get(DeckSection.Sideboard).contains(card)) {
211 get(DeckSection.Sideboard).remove(card);
212 return;
213 }
214 for (CardPool pool : parts.values()) {
215 if(pool.contains(card)) {
216 pool.remove(card);
217 return;
218 }
219 }
220 }
221
222 // will return new if it was absent
223 public CardPool getOrCreate(DeckSection deckSection) {

Callers 1

GameEndMethod · 0.80

Calls 5

hasMethod · 0.95
getMethod · 0.95
valuesMethod · 0.80
containsMethod · 0.65
removeMethod · 0.45

Tested by

no test coverage detected