soc.game
Interface SOCBoard.BoardFactory

All Known Implementing Classes:
SOCBoard.DefaultBoardFactory, SOCBoardLargeAtServer.BoardFactoryAtServer
Enclosing class:
SOCBoard

public static interface SOCBoard.BoardFactory

Board Factory for creating new boards for games at the client or server. (The server's version of SOCBoardLarge isolates makeNewBoard methods.) Called by game constructor via static SOCGame.boardFactory.

The default factory is SOCBoard.DefaultBoardFactory. For a server-side board factory, see soc.server.SOCBoardLargeAtServer.ServerBoardFactory.

Since:
2.0.00
Author:
Jeremy D Monin

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.
 

Method Detail

createBoard

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.

Parameters:
gameOpts - game's options if any, otherwise null
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