From d4df9986e5a5f61afa7437defca0cc44b85a1c0e Mon Sep 17 00:00:00 2001 From: "marcins78@gmail.com" Date: Wed, 5 Oct 2011 11:16:59 +0000 Subject: [PATCH] Adding format name to table. --- .../java/com/gempukku/lotro/hall/HallServer.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) 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 1cecfd27b..944e193d7 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 @@ -42,16 +42,18 @@ public class HallServer extends AbstractServer { _collectionDao = collectionDao; _chatServer.createChatRoom("Game Hall"); - _supportedFormatNames.put("fotr_block", "FotR Block"); - _supportedFormats.put("fotr_block", new FotRBlockFormat(_lotroServer.getLotroCardBlueprintLibrary())); - _formatCollectionIds.put("fotr_block", "default"); + addFormat("fotr_block", "Fellowship block", "default", new FotRBlockFormat(_lotroServer.getLotroCardBlueprintLibrary())); if (test) { - _supportedFormatNames.put("m_fotr_block", "Modified FotR Block"); - _supportedFormats.put("m_fotr_block", new ModifiedFotRBlockFormat(_lotroServer.getLotroCardBlueprintLibrary())); - _formatCollectionIds.put("m_fotr_block", "default"); + addFormat("m_fotr_block", "Modified Fellowship block", "default", new ModifiedFotRBlockFormat(_lotroServer.getLotroCardBlueprintLibrary())); } } + private void addFormat(String formatCode, String formatName, String formatCollectionId, LotroFormat format) { + _supportedFormatNames.put(formatCode, formatName); + _formatCollectionIds.put(formatCode, formatCollectionId); + _supportedFormats.put(formatCode, format); + } + public int getTablesCount() { return _awaitingTables.size() + _runningTables.size(); }