From d47ae88594bde6c6bae4d86a560b5969cfc4f346 Mon Sep 17 00:00:00 2001 From: "marcins78@gmail.com" Date: Wed, 2 Jan 2013 03:23:42 +0000 Subject: [PATCH] Queue display fixes. --- .../gempukku/lotro/hall/HallCommunicationChannel.java | 4 +++- .../java/com/gempukku/lotro/hall/HallInfoVisitor.java | 3 ++- .../main/java/com/gempukku/lotro/hall/HallServer.java | 8 ++++---- .../tournament/SingleEliminationOnDemandPrizes.java | 2 +- .../tournament/SingleEliminationRecurringQueue.java | 10 ++++++++++ .../com/gempukku/lotro/tournament/TournamentQueue.java | 4 ++++ .../src/main/webapp/js/gemp-014/hallUi.js | 4 +++- 7 files changed, 27 insertions(+), 8 deletions(-) diff --git a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/hall/HallCommunicationChannel.java b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/hall/HallCommunicationChannel.java index 7c981321a..b63dc7dde 100644 --- a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/hall/HallCommunicationChannel.java +++ b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/hall/HallCommunicationChannel.java @@ -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 props = new HashMap(); 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); diff --git a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/hall/HallInfoVisitor.java b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/hall/HallInfoVisitor.java index 807d6831d..ca7c1499c 100644 --- a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/hall/HallInfoVisitor.java +++ b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/hall/HallInfoVisitor.java @@ -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 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); } diff --git a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/hall/HallServer.java b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/hall/HallServer.java index d4eca4317..5a7b9d4f4 100644 --- a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/hall/HallServer.java +++ b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/hall/HallServer.java @@ -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())); } diff --git a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/tournament/SingleEliminationOnDemandPrizes.java b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/tournament/SingleEliminationOnDemandPrizes.java index 5c90c955b..7fa788a97 100644 --- a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/tournament/SingleEliminationOnDemandPrizes.java +++ b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/tournament/SingleEliminationOnDemandPrizes.java @@ -53,6 +53,6 @@ public class SingleEliminationOnDemandPrizes implements TournamentPrizes{ @Override public String getPrizeDescription() { - return "
3-(2+promo)-1-1
"; + return "
2-(1+promo)-1-1
"; } } diff --git a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/tournament/SingleEliminationRecurringQueue.java b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/tournament/SingleEliminationRecurringQueue.java index 474454d6e..4b4930314 100644 --- a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/tournament/SingleEliminationRecurringQueue.java +++ b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/tournament/SingleEliminationRecurringQueue.java @@ -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; diff --git a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/tournament/TournamentQueue.java b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/tournament/TournamentQueue.java index 5c6fa6be0..8f4c88a7a 100644 --- a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/tournament/TournamentQueue.java +++ b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/tournament/TournamentQueue.java @@ -16,6 +16,10 @@ public interface TournamentQueue { public String getPrizesDescription(); + public String getPairingDescription(); + + public String getStartCondition(); + public boolean isRequiresDeck(); public boolean process(TournamentQueueCallback tournamentQueueCallback); diff --git a/gemp-lotr/gemp-lotr-web/src/main/webapp/js/gemp-014/hallUi.js b/gemp-lotr/gemp-lotr-web/src/main/webapp/js/gemp-014/hallUi.js index d7260e375..4c6ba4669 100644 --- a/gemp-lotr/gemp-lotr-web/src/main/webapp/js/gemp-014/hallUi.js +++ b/gemp-lotr/gemp-lotr-web/src/main/webapp/js/gemp-014/hallUi.js @@ -139,7 +139,7 @@ var GempLotrHallUI = Class.extend({ header.append(" Tournament queues"); var table = $("
"); - table.append("FormatCollectionQueue namePlayersCostPrizesActions"); + table.append("FormatCollectionQueue nameStartsSystemPlayersCostPrizesActions"); content.append(table); this.tablesDiv.append(header); @@ -358,6 +358,8 @@ var GempLotrHallUI = Class.extend({ var row = $("" + queue.getAttribute("format") + "" + "" + queue.getAttribute("collection") + "" + "" + queue.getAttribute("queue") + "" + + "" + queue.getAttribute("start") + "" + + "" + queue.getAttribute("system") + "" + "" + queue.getAttribute("playerCount") + "" + "" + formatPrice(queue.getAttribute("cost")) + "" + "" + queue.getAttribute("prizes") + "" +