mirror of
https://github.com/magefree/mage.git
synced 2025-12-21 19:11:59 -08:00
added draft timing
This commit is contained in:
parent
982ee064a6
commit
cb73d4a25d
11 changed files with 419 additions and 31 deletions
|
|
@ -39,10 +39,12 @@ public class DraftPickView implements Serializable {
|
|||
|
||||
protected CardsView booster;
|
||||
protected CardsView picks;
|
||||
protected int timeout;
|
||||
|
||||
public DraftPickView(DraftPlayer player) {
|
||||
public DraftPickView(DraftPlayer player, int timeout) {
|
||||
this.booster = new CardsView(player.getBooster());
|
||||
this.picks = new CardsView(player.getDeck().getSideboard());
|
||||
this.timeout = timeout;
|
||||
}
|
||||
|
||||
public CardsView getBooster() {
|
||||
|
|
@ -52,4 +54,8 @@ public class DraftPickView implements Serializable {
|
|||
public CardsView getPicks() {
|
||||
return picks;
|
||||
}
|
||||
|
||||
public int getTimeout() {
|
||||
return timeout;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ package mage.view;
|
|||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import mage.cards.ExpansionSet;
|
||||
import mage.game.draft.Draft;
|
||||
|
||||
/**
|
||||
|
|
@ -39,11 +40,27 @@ import mage.game.draft.Draft;
|
|||
*/
|
||||
public class DraftView implements Serializable {
|
||||
|
||||
private List<TournamentPlayerView> players = new ArrayList<TournamentPlayerView>();
|
||||
private List<String> sets = new ArrayList<String>();
|
||||
private int boosterNum;
|
||||
private int cardNum;
|
||||
|
||||
public DraftView(Draft draft) {
|
||||
|
||||
for (ExpansionSet set: draft.getSets()) {
|
||||
sets.add(set.getName());
|
||||
}
|
||||
this.boosterNum = draft.getBoosterNum();
|
||||
this.cardNum = draft.getCardNum();
|
||||
}
|
||||
|
||||
public List<String> getSets() {
|
||||
return sets;
|
||||
}
|
||||
|
||||
public int getBoosterNum() {
|
||||
return boosterNum;
|
||||
}
|
||||
|
||||
public int getCardNum() {
|
||||
return cardNum;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue