fixed replay + some other fixes

This commit is contained in:
BetaSteward 2011-03-18 18:27:01 -04:00
parent ff3e0108cd
commit 35f0767f1b
24 changed files with 218 additions and 187 deletions

View file

@ -33,6 +33,7 @@ import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
import mage.Constants.TableState;
import mage.game.Game;
import mage.game.Seat;
import mage.game.Table;
@ -49,6 +50,7 @@ public class TableView implements Serializable {
private TableState tableState;
private boolean isTournament;
private List<SeatView> seats = new ArrayList<SeatView>();
private List<UUID> games = new ArrayList<UUID>();
public TableView(Table table) {
this.tableId = table.getId();
@ -59,6 +61,11 @@ public class TableView implements Serializable {
for (Seat seat: table.getSeats()) {
seats.add(new SeatView(seat));
}
if (!table.isTournament()) {
for (Game game: table.getMatch().getGames()) {
games.add(game.getId());
}
}
}
public UUID getTableId() {
@ -81,6 +88,10 @@ public class TableView implements Serializable {
return seats;
}
public List<UUID> getGames() {
return games;
}
public boolean isTournament() {
return this.isTournament;
}