changed time from int to long
parent
33db19c058
commit
977ed33c18
|
@ -14,10 +14,10 @@ public class MagicCard implements MagicSource,MagicTarget,Comparable<MagicCard>
|
|||
private MagicPlayer owner;
|
||||
private boolean token=false;
|
||||
private boolean known=true;
|
||||
private int id;
|
||||
private long id;
|
||||
private int imageIndex=0;
|
||||
|
||||
public MagicCard(final MagicCardDefinition cardDefinition,final MagicPlayer owner,final int id) {
|
||||
public MagicCard(final MagicCardDefinition cardDefinition,final MagicPlayer owner,final long id) {
|
||||
this.cardDefinition=cardDefinition;
|
||||
this.owner=owner;
|
||||
this.id=id;
|
||||
|
@ -169,6 +169,6 @@ public class MagicCard implements MagicSource,MagicTarget,Comparable<MagicCard>
|
|||
|
||||
@Override
|
||||
public int compareTo(final MagicCard card) {
|
||||
return id-card.id;
|
||||
return Long.signum(id - card.id);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -71,7 +71,7 @@ public class MagicCardList extends ArrayList<MagicCard> {
|
|||
return index;
|
||||
}
|
||||
|
||||
public MagicCard getCard(final int id) {
|
||||
public MagicCard getCard(final long id) {
|
||||
for (final MagicCard card : this) {
|
||||
if (card.getId()==id) {
|
||||
return card;
|
||||
|
|
|
@ -86,7 +86,7 @@ public class MagicGame {
|
|||
private final MagicLogBook logBook;
|
||||
private final MagicLogMessageBuilder logMessageBuilder;
|
||||
private long[] keys;
|
||||
private int time = 1000000;
|
||||
private long time = 1000000;
|
||||
|
||||
public static MagicGame getInstance() {
|
||||
return INSTANCE;
|
||||
|
@ -198,15 +198,15 @@ public class MagicGame {
|
|||
return score;
|
||||
}
|
||||
|
||||
public int getTime() {
|
||||
public long getTime() {
|
||||
return time;
|
||||
}
|
||||
|
||||
public void setTime(final int t) {
|
||||
public void setTime(final long t) {
|
||||
time = t;
|
||||
}
|
||||
|
||||
public int incTime() {
|
||||
public long incTime() {
|
||||
time++;
|
||||
return time;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue