Queue display fixes.
This commit is contained in:
@@ -61,7 +61,7 @@ public class HallCommunicationChannel {
|
||||
|
||||
@Override
|
||||
public void visitTournamentQueue(String tournamentQueueKey, int cost, String collectionName, String formatName, String tournamentQueueName,
|
||||
String tournamentPrizes, int playerCount, boolean playerSignedUp) {
|
||||
String tournamentPrizes, String pairingDescription, String startCondition, int playerCount, boolean playerSignedUp) {
|
||||
Map<String, String> props = new HashMap<String, String>();
|
||||
props.put("cost", String.valueOf(cost));
|
||||
props.put("collection", collectionName);
|
||||
@@ -69,6 +69,8 @@ public class HallCommunicationChannel {
|
||||
props.put("queue", tournamentQueueName);
|
||||
props.put("playerCount", String.valueOf(playerCount));
|
||||
props.put("prizes", tournamentPrizes);
|
||||
props.put("system", pairingDescription);
|
||||
props.put("start", startCondition);
|
||||
props.put("signedUp", String.valueOf(playerSignedUp));
|
||||
|
||||
tournamentsOnServer.put(tournamentQueueKey, props);
|
||||
|
||||
@@ -13,7 +13,8 @@ public interface HallInfoVisitor {
|
||||
|
||||
public void visitTable(String tableId, String gameId, boolean watchable, TableStatus status, String statusDescription, String formatName, String tournamentName, List<String> playerIds, String winner);
|
||||
|
||||
public void visitTournamentQueue(String tournamentQueueKey, int cost, String collectionName, String formatName, String tournamentQueueName, String tournamentPrizes, int playerCount, boolean playerSignedUp);
|
||||
public void visitTournamentQueue(String tournamentQueueKey, int cost, String collectionName, String formatName, String tournamentQueueName, String tournamentPrizes,
|
||||
String pairingDescription, String startCondition, int playerCount, boolean playerSignedUp);
|
||||
|
||||
public void runningPlayerGame(String gameId);
|
||||
}
|
||||
|
||||
@@ -67,13 +67,13 @@ public class HallServer extends AbstractServer {
|
||||
_hallChat = _chatServer.createChatRoom("Game Hall", 10);
|
||||
|
||||
_tournamentQueues.put("fotr_queue", new SingleEliminationRecurringQueue(635, "fotr_block",
|
||||
CollectionType.MY_CARDS, "fotrQueue-", "Fellowship Block 8-man single-elimination", 8,
|
||||
CollectionType.MY_CARDS, "fotrQueue-", "Fellowship Block", 8,
|
||||
true, tournamentService, _tournamentPrizeSchemeRegistry.getTournamentPrizes("onDemand")));
|
||||
_tournamentQueues.put("movie_queue", new SingleEliminationRecurringQueue(635, "movie",
|
||||
CollectionType.MY_CARDS, "movieQueue-", "Movie Block 8-man single-elimination", 8,
|
||||
CollectionType.MY_CARDS, "movieQueue-", "Movie Block", 8,
|
||||
true, tournamentService, _tournamentPrizeSchemeRegistry.getTournamentPrizes("onDemand")));
|
||||
_tournamentQueues.put("expanded_queue", new SingleEliminationRecurringQueue(635, "expanded",
|
||||
CollectionType.MY_CARDS, "expandedQueue-", "Expanded 8-man single-elimination", 8,
|
||||
CollectionType.MY_CARDS, "expandedQueue-", "Expanded", 8,
|
||||
true, tournamentService, _tournamentPrizeSchemeRegistry.getTournamentPrizes("onDemand")));
|
||||
}
|
||||
|
||||
@@ -344,7 +344,7 @@ public class HallServer extends AbstractServer {
|
||||
TournamentQueue tournamentQueue = tournamentQueueEntry.getValue();
|
||||
visitor.visitTournamentQueue(tournamentQueueKey, tournamentQueue.getCost(), tournamentQueue.getCollectionType().getFullName(),
|
||||
_formatLibrary.getFormat(tournamentQueue.getFormat()).getName(), tournamentQueue.getTournamentQueueName(),
|
||||
tournamentQueue.getPrizesDescription(),
|
||||
tournamentQueue.getPrizesDescription(), tournamentQueue.getPairingDescription(), tournamentQueue.getStartCondition(),
|
||||
tournamentQueue.getPlayerCount(), tournamentQueue.isPlayerSignedUp(player.getName()));
|
||||
}
|
||||
|
||||
|
||||
@@ -53,6 +53,6 @@ public class SingleEliminationOnDemandPrizes implements TournamentPrizes{
|
||||
|
||||
@Override
|
||||
public String getPrizeDescription() {
|
||||
return "<div class='prizeHint' value='3 wins - 2 boosters, 2 wins - 1 booster and a random promo, 1 win - 1 booster'>3-(2+promo)-1-1</div>";
|
||||
return "<div class='prizeHint' value='3 wins - 2 boosters, 2 wins - 1 booster and a random promo, 1 win - 1 booster'>2-(1+promo)-1-1</div>";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,6 +65,16 @@ public class SingleEliminationRecurringQueue implements TournamentQueue {
|
||||
return _tournamentPrizes.getPrizeDescription();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPairingDescription() {
|
||||
return "Single elimination";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getStartCondition() {
|
||||
return "When "+_playerCap+" players join";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isRequiresDeck() {
|
||||
return _requiresDeck;
|
||||
|
||||
@@ -16,6 +16,10 @@ public interface TournamentQueue {
|
||||
|
||||
public String getPrizesDescription();
|
||||
|
||||
public String getPairingDescription();
|
||||
|
||||
public String getStartCondition();
|
||||
|
||||
public boolean isRequiresDeck();
|
||||
|
||||
public boolean process(TournamentQueueCallback tournamentQueueCallback);
|
||||
|
||||
@@ -139,7 +139,7 @@ var GempLotrHallUI = Class.extend({
|
||||
header.append(" Tournament queues");
|
||||
|
||||
var table = $("<table class='tables queues'></table>");
|
||||
table.append("<tr><th width='10%'>Format</th><th width='10%'>Collection</th><th width='20%'>Queue name</th><th width='10%'>Players</th><th width='10%'>Cost</th><th width='30%'>Prizes</th><th width='10%'>Actions</th></tr>");
|
||||
table.append("<tr><th width='10%'>Format</th><th width='8%'>Collection</th><th width='12%'>Queue name</th><th width='16%'>Starts</th><th width='10%'>System</th><th width='6%'>Players</th><th width='8%'>Cost</th><th width='20%'>Prizes</th><th width='10%'>Actions</th></tr>");
|
||||
content.append(table);
|
||||
|
||||
this.tablesDiv.append(header);
|
||||
@@ -358,6 +358,8 @@ var GempLotrHallUI = Class.extend({
|
||||
var row = $("<tr class='queue" + id + "'><td>" + queue.getAttribute("format") + "</td>" +
|
||||
"<td>" + queue.getAttribute("collection") + "</td>" +
|
||||
"<td>" + queue.getAttribute("queue") + "</td>" +
|
||||
"<td>" + queue.getAttribute("start") + "</td>" +
|
||||
"<td>" + queue.getAttribute("system") + "</td>" +
|
||||
"<td>" + queue.getAttribute("playerCount") + "</td>" +
|
||||
"<td align='right'>" + formatPrice(queue.getAttribute("cost")) + "</td>" +
|
||||
"<td>" + queue.getAttribute("prizes") + "</td>" +
|
||||
|
||||
Reference in New Issue
Block a user