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
|
|
@ -42,6 +42,7 @@ public class GameView implements Serializable {
|
|||
|
||||
private static final Logger LOGGER = Logger.getLogger(GameView.class);
|
||||
private final int priorityTime;
|
||||
private final int bufferTime;
|
||||
private final List<PlayerView> players = new ArrayList<>();
|
||||
private CardsView hand;
|
||||
private PlayableObjectsList canPlayObjects;
|
||||
|
|
@ -68,6 +69,7 @@ public class GameView implements Serializable {
|
|||
Player createdForPlayer = null;
|
||||
this.isPlayer = createdForPlayerId != null;
|
||||
this.priorityTime = game.getPriorityTime();
|
||||
this.bufferTime = game.getBufferTime();
|
||||
for (Player player : state.getPlayers().values()) {
|
||||
players.add(new PlayerView(player, state, game, createdForPlayerId, watcherUserId));
|
||||
if (player.getId().equals(createdForPlayerId)) {
|
||||
|
|
@ -313,6 +315,10 @@ public class GameView implements Serializable {
|
|||
return priorityTime;
|
||||
}
|
||||
|
||||
public int getBufferTime() {
|
||||
return bufferTime;
|
||||
}
|
||||
|
||||
public UUID getActivePlayerId() {
|
||||
return activePlayerId;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue