soc.server
Class SOCBoardLargeAtServer.BoardFactoryAtServer

java.lang.Object
  extended by soc.server.SOCBoardLargeAtServer.BoardFactoryAtServer
All Implemented Interfaces:
SOCBoard.BoardFactory
Enclosing class:
SOCBoardLargeAtServer

public static class SOCBoardLargeAtServer.BoardFactoryAtServer
extends java.lang.Object
implements SOCBoard.BoardFactory

Server-side implementation of SOCBoard.BoardFactory to create SOCBoardLargeAtServers. Called by game constructor via static SOCGame.boardFactory.

Since:
2.0.00
Author:
Jeremy D Monin

Constructor Summary
SOCBoardLargeAtServer.BoardFactoryAtServer()
           
 
Method Summary
 SOCBoard createBoard(java.util.Map<java.lang.String,SOCGameOption> gameOpts, boolean largeBoard, int maxPlayers)
          Create a new Settlers of Catan Board based on gameOpts; this is a factory method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SOCBoardLargeAtServer.BoardFactoryAtServer

public SOCBoardLargeAtServer.BoardFactoryAtServer()
Method Detail

createBoard

public SOCBoard createBoard(java.util.Map<java.lang.String,SOCGameOption> gameOpts,
                            boolean largeBoard,
                            int maxPlayers)
                     throws java.lang.IllegalArgumentException
Create a new Settlers of Catan Board based on gameOpts; this is a factory method. Board size is based on maxPlayers and optional scenario (game option "SC").

From v1.1.11 through 1.1.xx, this was SOCBoard.createBoard. Moved to new factory class in 2.0.00.

Specified by:
createBoard in interface SOCBoard.BoardFactory
Parameters:
gameOpts - if game has options, its map of SOCGameOption; otherwise null. If largeBoard, and getBoardSize(Map, int) gives a non-default size, "_BHW" will be added to gameOpts.
largeBoard - true if SOCBoardLarge should be used (v3 encoding)
maxPlayers - Maximum players; must be 4 or 6.
Throws:
java.lang.IllegalArgumentException - if maxPlayers is not 4 or 6 or (unlikely internal error) game option "_BHW" isn't known in SOCGameOption.getOption.