soc.game
Class SOCBoard.DefaultBoardFactory
java.lang.Object
soc.game.SOCBoard.DefaultBoardFactory
- All Implemented Interfaces:
- SOCBoard.BoardFactory
- Enclosing class:
- SOCBoard
public static class SOCBoard.DefaultBoardFactory
- extends java.lang.Object
- implements SOCBoard.BoardFactory
Default implementation of SOCBoard.BoardFactory
, used at client.
Called by game constructor via static SOCGame.boardFactory
.
- 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. |
static SOCBoard |
staticCreateBoard(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 |
SOCBoard.DefaultBoardFactory
public SOCBoard.DefaultBoardFactory()
staticCreateBoard
public static SOCBoard staticCreateBoard(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.
Static for fallback access from other factory implementations.
- Parameters:
gameOpts
- if game has options, map of SOCGameOption
; 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
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.
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, map of SOCGameOption
; 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