added static num_games to count the number of game objects created via main constructor

master
melvin 2011-07-06 12:09:58 +08:00
parent 426b124ac7
commit 7c41eba73a
1 changed files with 2 additions and 0 deletions

View File

@ -46,6 +46,7 @@ import magic.model.trigger.MagicTriggerType;
public class MagicGame { public class MagicGame {
public static int num_games = 0;
public static MagicGame INSTANCE = null; public static MagicGame INSTANCE = null;
public static final boolean LOSE_DRAW_EMPTY_LIBRARY=true; public static final boolean LOSE_DRAW_EMPTY_LIBRARY=true;
public static final int LOSING_POISON=10; public static final int LOSING_POISON=10;
@ -121,6 +122,7 @@ public class MagicGame {
payedCost=new MagicPayedCost(); payedCost=new MagicPayedCost();
changePhase(gameplay.getStartPhase(this)); changePhase(gameplay.getStartPhase(this));
num_games++;
INSTANCE = this; INSTANCE = this;
} }