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

Method getCardForUi

forge-game/src/main/java/forge/game/card/Card.java:7488–7498  ·  view source on GitHub ↗
(IPaperCard pc)

Source from the content-addressed store, hash-verified

7486
7487 private static final Map<PaperCard, Card> cp2card = Maps.newHashMap();
7488 public static Card getCardForUi(IPaperCard pc) {
7489 if (pc instanceof PaperCard) {
7490 Card res = cp2card.get(pc);
7491 if (res == null) {
7492 res = fromPaperCard(pc, null);
7493 cp2card.put((PaperCard) pc, res);
7494 }
7495 return res;
7496 }
7497 return fromPaperCard(pc, null);
7498 }
7499
7500 //safe way to get card for ui if card may be null
7501 public static Card getCardForUi(Card c) {

Callers 13

executeReplacementMethod · 0.95
getImageKeyMethod · 0.95
setImageKeyMethod · 0.95
getCardForUiMethod · 0.95
updateStateMethod · 0.95
getRotationMethod · 0.95
displayIconOverlayMethod · 0.95
getInitialRotationMethod · 0.95
getChoicesMethod · 0.95
showSelectedCardMethod · 0.95

Calls 3

fromPaperCardMethod · 0.95
getMethod · 0.65
putMethod · 0.45

Tested by

no test coverage detected