mirror of
https://github.com/magefree/mage.git
synced 2026-01-09 12:22:10 -08:00
Added a new column to the table list showing the number of wins for matches and number of used / total seats for tournaments.
This commit is contained in:
parent
53a4caf9be
commit
12a01788e6
3 changed files with 27 additions and 13 deletions
|
|
@ -50,6 +50,7 @@ public class TableView implements Serializable {
|
|||
private String deckType;
|
||||
private String tableName;
|
||||
private String controllerName;
|
||||
private String additionalInfo;
|
||||
private Date createTime;
|
||||
private TableState tableState;
|
||||
private boolean isTournament;
|
||||
|
|
@ -69,10 +70,14 @@ public class TableView implements Serializable {
|
|||
seats.add(new SeatView(seat));
|
||||
}
|
||||
if (!table.isTournament()) {
|
||||
this.additionalInfo = new StringBuilder("Wins: ").append(table.getMatch().getWinsNeeded()).toString();
|
||||
for (Game game: table.getMatch().getGames()) {
|
||||
games.add(game.getId());
|
||||
}
|
||||
} else {
|
||||
this.additionalInfo = new StringBuilder("Seats: ").append(table.getTournament().getPlayers().size()).append("/").append(table.getNumberOfSeats()).toString();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public UUID getTableId() {
|
||||
|
|
@ -114,5 +119,8 @@ public class TableView implements Serializable {
|
|||
public boolean isTournament() {
|
||||
return this.isTournament;
|
||||
}
|
||||
public String getAdditionalInfo() {
|
||||
return this.additionalInfo;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue