Get rid of global static Card cache and hang it off the Game instead.

This paves the way for having multiple simulataneous game objects (e.g. for simulation).
This commit is contained in:
Myrd
2014-12-28 16:31:23 +00:00
parent 5fe82c5758
commit bf34aec4fc
17 changed files with 115 additions and 109 deletions

View File

@@ -234,15 +234,15 @@ public class RunTest {
* false);
*/
c = new Card(1);
Card c2 = new Card(2);
c = new Card(1, null);
Card c2 = new Card(2, null);
c.addIntrinsicKeyword("Flying");
c2.addIntrinsicKeyword("Flying");
// check("107", CombatUtil.canBlock(c, c2));
// check("108", CombatUtil.canBlock(c2, c));
c = new Card(1);
c2 = new Card(2);
c = new Card(1, null);
c2 = new Card(2, null);
c2.addIntrinsicKeyword("Flying");
this.check("109", CombatUtil.canBlock(c, c2));
this.check("110", !CombatUtil.canBlock(c2, c));