forked from External/mage
game timer: Add chess-style buffer time option (#10598)
* UI Changes * Add new buffer time options * Main functionality * Final implementation Also added player UI for when they are using their buffer time (timer turns green)
This commit is contained in:
parent
b7543af939
commit
519b3988be
24 changed files with 273 additions and 16 deletions
|
|
@ -119,6 +119,7 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
protected int turns;
|
||||
protected int storedBookmark = -1;
|
||||
protected int priorityTimeLeft = Integer.MAX_VALUE;
|
||||
protected int bufferTimeLeft = 0;
|
||||
|
||||
// conceded or connection lost game
|
||||
protected boolean left;
|
||||
|
|
@ -275,6 +276,7 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
this.justActivatedType = player.justActivatedType;
|
||||
|
||||
this.priorityTimeLeft = player.getPriorityTimeLeft();
|
||||
this.bufferTimeLeft = player.getBufferTimeLeft();
|
||||
this.reachedNextTurnAfterLeaving = player.reachedNextTurnAfterLeaving;
|
||||
|
||||
this.castSourceIdWithAlternateMana.addAll(player.getCastSourceIdWithAlternateMana());
|
||||
|
|
@ -4454,6 +4456,16 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
return priorityTimeLeft;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBufferTimeLeft(int timeLeft) {
|
||||
bufferTimeLeft = timeLeft;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getBufferTimeLeft() {
|
||||
return bufferTimeLeft;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasQuit() {
|
||||
return quit;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue