From b43c481b2b0540fd00e47483afbc7b0d78df240a Mon Sep 17 00:00:00 2001 From: Myrd Date: Fri, 1 Jan 2016 19:06:16 +0000 Subject: [PATCH] Add a TODO to game sim code. --- forge-ai/src/main/java/forge/ai/simulation/GameCopier.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/forge-ai/src/main/java/forge/ai/simulation/GameCopier.java b/forge-ai/src/main/java/forge/ai/simulation/GameCopier.java index 1e8facdd8f5..88932a09c8b 100644 --- a/forge-ai/src/main/java/forge/ai/simulation/GameCopier.java +++ b/forge-ai/src/main/java/forge/ai/simulation/GameCopier.java @@ -191,6 +191,11 @@ public class GameCopier { newCard = CardFactory.makeToken(CardFactory.TokenInfo.fromString(tokenStr), owner).get(0); } else { newCard = Card.fromPaperCard(c.getPaperCard(), owner); + // TODO: The above is very expensive and accounts for the vast majority of GameCopier execution time. + // The issue is that it requires parsing the original card from scratch from the paper card. We should + // improve the copier to accurately copy the card from its actual state, so that the paper card shouldn't + // be needed. Then, we can construct the card via: + // newCard = new Card(newGame.nextCardId(), newGame); } cardMap.put(c, newCard);