Re: Splitting CardFactory
Nice!!! Would you be so kind as to commit them to svn? Also, if the plan is to make more than 10 of them, maybe CardFactory should be made into a seperate package?
High Quality Resources for Collectible Card Games and Home of the CCGHQ Team
https://www.slightlymagic.net/forum/
https://www.slightlymagic.net/forum/viewtopic.php?f=52&t=1234
public class Deck implements Serializable {
private static final long serialVersionUID = -2188987217361601903L;
private String deckType;
private boolean isRegular;
private boolean isSealed;
private boolean isDraft;
private ArrayList<String> main = new ArrayList<String>();
private ArrayList<String> sideboard = new ArrayList<String>();
//very important, do NOT change this
private String name = "";
private Object readResolve() throws ObjectStreamException {
System.out.println("resolving obsolete Deck");
forge.Deck d = new forge.Deck(deckType);
d.setName(name);
for(String s:main)
d.addMain(s);
for(String s:sideboard)
d.addSideboard(s);
return d;
}
}
I'm not exactly sure what we were doing wrong initially, but as I was debugging the stuff I tried last, it became clear that the SpellAbilities were added the other way around.AWESOME!!!![]()
![]()
![]()
![]()
![]()
![]()
![]()
Should split the keywords out to their own file too. And yeah, when you have the chance, separating the spells into Instants and Sorceries would rock. I don't think splitting by color would be necessary. We may need to end up with a Creatures1 and Creatures2 sort of idea after a while.
What was the trick?
: Put a 1/1 colorless Insect artifact creature token with flying named Wasp onto the battlefield."Yeah. CardFactory is now only about 18### lines long.DennisBergkamp wrote:Converting those should get rid of a lot of redundant lines of code