# PuzzleObject (vilya 1.3 API)
Date: 2011-04-06

## com.threerings.puzzle.data
Class PuzzleObject

    java.lang.Object
      com.threerings.presents.dobj.DObject
          com.threerings.crowd.data.PlaceObject
              com.threerings.parlor.game.data.GameObject
                  com.threerings.puzzle.data.PuzzleObject

All Implemented Interfaces:
  com.threerings.crowd.chat.data.SpeakObject, com.threerings.io.Streamable, com.threerings.presents.data.InvocationCodes, PuzzleCodes

    public class PuzzleObject

extends GameObject
implements PuzzleCodes

Extends the basic `GameObject` to add individual player status. Puzzle games typically contain numerous players that may be knocked out of the game while the overall game continues on, thereby necessitating this second level of game status.

Nested Class Summary

Nested classes/interfaces inherited from class com.threerings.crowd.data.PlaceObject
`com.threerings.crowd.data.PlaceObject.ManagerCaller`

Nested classes/interfaces inherited from interface com.threerings.crowd.chat.data.SpeakObject
`com.threerings.crowd.chat.data.SpeakObject.ListenerOp`

Nested classes/interfaces inherited from interface com.threerings.io.Streamable
`com.threerings.io.Streamable.Closure`

Field Summary
`int` `difficulty` The puzzle difficulty level.
`static String` `DIFFICULTY` The field name of the `difficulty` field.
`static String` `PUZZLE_GAME_SERVICE` The field name of the `puzzleGameService` field.
`PuzzleGameMarshaller` `puzzleGameService` Provides general puzzle game invocation services.
`long` `seed` The seed used to germinate the boards.
`static String` `SEED` The field name of the `seed` field.
`BoardSummary[]` `summaries` Summaries of the boards of all players in this puzzle (may be null if the puzzle doesn't support individual player boards).
`static String` `SUMMARIES` The field name of the `summaries` field.

Fields inherited from class com.threerings.parlor.game.data.GameObject
`CANCELLED, GAME_OVER, IN_PLAY, IS_PRIVATE, IS_RATED, isPrivate, isRated, PLAYER_IN_PLAY, PLAYER_LEFT_GAME, PLAYER_STATUS, players, PLAYERS, playerStatus, PRE_GAME, SESSION_ID, sessionId, state, STATE, winners, WINNERS`

Fields inherited from class com.threerings.crowd.data.PlaceObject
`manager, OCCUPANT_INFO, occupantInfo, occupants, OCCUPANTS, SPEAK_SERVICE, speakService`

Fields inherited from interface com.threerings.puzzle.data.PuzzleCodes
`DEBUG_PUZZLE, DEFAULT_DIFFICULTY, PUZZLE_MESSAGE_BUNDLE`

Fields inherited from interface com.threerings.presents.data.InvocationCodes
`ACCESS_DENIED, E_ACCESS_DENIED, E_INTERNAL_ERROR, GLOBAL_GROUP, INTERNAL_ERROR`

Constructor Summary
`PuzzleObject()`

Method Summary
`void` `setDifficulty(int value)` Requests that the `difficulty` field be set to the specified value.
`void` `setPuzzleGameService(PuzzleGameMarshaller value)` Requests that the `puzzleGameService` field be set to the specified value.
`void` `setSeed(long value)` Requests that the `seed` field be set to the specified value.
`void` `setSummaries(BoardSummary[] value)` Requests that the `summaries` field be set to the specified value.
`void` `setSummariesAt(BoardSummary value, int index)` Requests that the `index`th element of `summaries` field be set to the specified value.

Methods inherited from class com.threerings.parlor.game.data.GameObject
`getActivePlayerCount, getPlayerCount, getPlayerIndex, getWinnerCount, getWinnerIndex, isActivePlayer, isDraw, isInPlay, isOccupiedPlayer, isWinner, setIsPrivate, setIsRated, setPlayers, setPlayersAt, setPlayerStatus, setPlayerStatusAt, setSessionId, setState, setWinners, setWinnersAt`

Methods inherited from class com.threerings.crowd.data.PlaceObject
`addToOccupantInfo, addToOccupants, applyToListeners, getOccupantInfo, initManagerCaller, removeFromOccupantInfo, removeFromOccupants, setOccupantInfo, setSpeakService, shouldBroadcast, updateOccupantInfo`

Methods inherited from class com.threerings.presents.dobj.DObject

`acquireLock, addListener, addListener, addSubscriber, addToSet, cancelTransaction, changeAttribute, checkPermissions, checkPermissions, commitTransaction, destroy, getAccessController, getAttribute, getLocal, getLocals, getManager, getOid, getSet, inTransaction, isActive, notifyListeners, notifyProxies, postEvent, postMessage, postMessage, readField__oid, releaseLock, removeFromSet, removeListener, removeSubscriber, setAccessController, setAttribute, setDestroyOnLastSubscriberRemoved, setLocal, setManager, setOid, startTransaction, toString, updateSet, which, writeField__oid`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### PUZZLE_GAME_SERVICE

    @Generated(value="com.threerings.presents.tools.GenDObjectTask")
    public static final String PUZZLE_GAME_SERVICE

  The field name of the `puzzleGameService` field.

  See Also:
    Constant Field Values

### DIFFICULTY

    @Generated(value="com.threerings.presents.tools.GenDObjectTask")
    public static final String DIFFICULTY

  The field name of the `difficulty` field.

  See Also:
    Constant Field Values

### SUMMARIES

    @Generated(value="com.threerings.presents.tools.GenDObjectTask")
    public static final String SUMMARIES

  The field name of the `summaries` field.

  See Also:
    Constant Field Values

### SEED

    @Generated(value="com.threerings.presents.tools.GenDObjectTask")
    public static final String SEED

  The field name of the `seed` field.

  See Also:
    Constant Field Values

### puzzleGameService

    public PuzzleGameMarshaller puzzleGameService

  Provides general puzzle game invocation services.

### difficulty

    public int difficulty

  The puzzle difficulty level.

### summaries

    public BoardSummary[] summaries

  Summaries of the boards of all players in this puzzle (may be null if the puzzle doesn't support individual player boards).

### seed

    public long seed

  The seed used to germinate the boards.

Constructor Detail

### PuzzleObject

    public PuzzleObject()

Method Detail

### setPuzzleGameService

    @Generated(value="com.threerings.presents.tools.GenDObjectTask")
    public void setPuzzleGameService(PuzzleGameMarshaller value)

  Requests that the `puzzleGameService` field be set to the specified value. The local value will be updated immediately and an event will be propagated through the system to notify all listeners that the attribute did change. Proxied copies of this object (on clients) will apply the value change when they received the attribute changed notification.

### setDifficulty

    @Generated(value="com.threerings.presents.tools.GenDObjectTask")
    public void setDifficulty(int value)

  Requests that the `difficulty` field be set to the specified value. The local value will be updated immediately and an event will be propagated through the system to notify all listeners that the attribute did change. Proxied copies of this object (on clients) will apply the value change when they received the attribute changed notification.

### setSummaries

    @Generated(value="com.threerings.presents.tools.GenDObjectTask")
    public void setSummaries(BoardSummary[] value)

  Requests that the `summaries` field be set to the specified value. The local value will be updated immediately and an event will be propagated through the system to notify all listeners that the attribute did change. Proxied copies of this object (on clients) will apply the value change when they received the attribute changed notification.

### setSummariesAt

    @Generated(value="com.threerings.presents.tools.GenDObjectTask")
    public void setSummariesAt(BoardSummary value,
                                         int index)

  Requests that the `index`th element of `summaries` field be set to the specified value. The local value will be updated immediately and an event will be propagated through the system to notify all listeners that the attribute did change. Proxied copies of this object (on clients) will apply the value change when they received the attribute changed notification.

### setSeed

    @Generated(value="com.threerings.presents.tools.GenDObjectTask")
    public void setSeed(long value)

  Requests that the `seed` field be set to the specified value. The local value will be updated immediately and an event will be propagated through the system to notify all listeners that the attribute did change. Proxied copies of this object (on clients) will apply the value change when they received the attribute changed notification.

Copyright © 2011. All Rights Reserved.