|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--VASSAL.build.module.ObscurableOptions
Determines whether players are allowed to un-mask other players pieces. The module designer may set the option to always on, always off, or let the players determine it with a Preferences setting.
| Nested Class Summary | |
static class |
ObscurableOptions.SetAllowed
|
| Field Summary | |
static java.lang.String |
COMMAND_ID
|
static java.lang.String |
PREFS_KEY
|
| Method Summary | |
void |
allow(java.lang.String id)
|
void |
allowAll()
|
void |
allowNone()
|
void |
allowSome(java.lang.String preferencesPrompt)
|
Command |
decode(java.lang.String command)
Translate a String into a Command |
void |
disallow(java.lang.String id)
|
java.lang.String |
encode(Command c)
Translate a Command into a String |
static ObscurableOptions |
getInstance()
|
Command |
getRestoreCommand()
When saving a game, each GameComponent should return a Command that, when executed, restores the GameComponent to its
state when the game was saved
If this component has no persistent state, return null |
boolean |
isUnmaskable(java.lang.String id)
Return true if pieces belonging to the given id are un-maskable by other players |
void |
setPrompt(java.lang.String preferencesPrompt)
Set the text accompanying the "Allow opponent to unmask" control in the Preferences |
void |
setup(boolean gameStarting)
Notify the GameComponent that a game has started/ended |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String COMMAND_ID
public static final java.lang.String PREFS_KEY
| Method Detail |
public static ObscurableOptions getInstance()
public void allowSome(java.lang.String preferencesPrompt)
public void setPrompt(java.lang.String preferencesPrompt)
public void allowAll()
public void allowNone()
public void allow(java.lang.String id)
public void disallow(java.lang.String id)
public Command decode(java.lang.String command)
CommandEncoderCommand
decode in interface CommandEncoderpublic java.lang.String encode(Command c)
CommandEncoderCommand into a String
encode in interface CommandEncoderpublic Command getRestoreCommand()
GameComponentCommand that, when executed, restores the GameComponent to its
state when the game was saved
If this component has no persistent state, return null
getRestoreCommand in interface GameComponentpublic void setup(boolean gameStarting)
GameComponent
setup in interface GameComponentgameStarting - if true, a game is starting. If false, then a game is endingpublic boolean isUnmaskable(java.lang.String id)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||