- Adding missing player Ids to recording listeners.

This commit is contained in:
marcins78@gmail.com
2011-10-18 20:02:01 +00:00
parent 09c54b15b9
commit 1092eab159
3 changed files with 8 additions and 5 deletions

View File

@@ -75,8 +75,11 @@ public class GameState {
addPlayerCards(stringListEntry.getKey(), stringListEntry.getValue(), library);
}
for (String playerId : playerOrder.getAllPlayers())
_recordingListeners.put(playerId, new GatheringParticipantCommunicationChannel(playerId));
for (String playerId : playerOrder.getAllPlayers()) {
GatheringParticipantCommunicationChannel listener = new GatheringParticipantCommunicationChannel(playerId);
listener.setPlayerOrder(playerOrder.getAllPlayers());
_recordingListeners.put(playerId, listener);
}
for (String playerId : _gameStateListeners.keySet())
sendStateToPlayer(playerId);

View File

@@ -36,7 +36,7 @@ public class LotroServer extends AbstractServer {
_lotroCardBlueprintLibrary = library;
_chatServer = chatServer;
_defaultCollection = new DefaultCardCollection(library);
for (int i = 1; i <= 4; i++) {
for (int i = 1; i <= 6; i++) {
for (int j = 1; j <= 365; j++) {
String blueprintId = i + "_" + j;
try {

View File

@@ -82,13 +82,13 @@ public abstract class DefaultLotroFormat implements LotroFormat {
if (deck.getSites() == null)
throw new DeckInvalidException("Deck doesn't have sites");
if (deck.getSites().size() != 9)
throw new DeckInvalidException("Deck doesn't have exactly nine sites");
throw new DeckInvalidException("Deck doesn't have nine sites");
for (String site : deck.getSites()) {
LotroCardBlueprint siteBlueprint = _library.getLotroCardBlueprint(site);
if (siteBlueprint.getCardType() != CardType.SITE)
throw new DeckInvalidException("Card assigned as Site is not really a site");
if (siteBlueprint.getSiteBlock() != _siteBlock)
throw new DeckInvalidException("Site is not from the block used: " + siteBlueprint.getName());
throw new DeckInvalidException("Invalid site: " + siteBlueprint.getName());
}
if (_validSets.size() > 0) {