com.threerings.puzzle.drop.data
Class DropBoardSummary

java.lang.Object
  extended by com.threerings.io.SimpleStreamableObject
      extended by com.threerings.puzzle.data.BoardSummary
          extended by com.threerings.puzzle.drop.data.DropBoardSummary
All Implemented Interfaces:
Streamable

public class DropBoardSummary
extends BoardSummary

Provides a summary of a DropBoard.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.threerings.io.Streamable
Streamable.Closure
 
Field Summary
protected  DropBoard _dboard
          The drop board we're summarizing.
 byte[] columns
          The row levels for each column.
 
Fields inherited from class com.threerings.puzzle.data.BoardSummary
_board
 
Constructor Summary
DropBoardSummary()
          Constructs an empty drop board summary for use when un-serializing.
DropBoardSummary(Board board)
          Constructs a drop board summary that retrieves board information from the supplied board when summarizing.
 
Method Summary
 int getHighestColumn(int startx, int endx)
          Returns the column number of the column within the given column range that contains the most pieces.
 void setBoard(Board board)
          Sets the board associated with this board summary, causing an immediate update to this summary.
 void summarize()
          Called by the PuzzleManager to refresh the board summary information by studying the associated board contents.
 
Methods inherited from class com.threerings.io.SimpleStreamableObject
toString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

columns

public byte[] columns
The row levels for each column.


_dboard

protected transient DropBoard _dboard
The drop board we're summarizing.

Constructor Detail

DropBoardSummary

public DropBoardSummary()
Constructs an empty drop board summary for use when un-serializing.


DropBoardSummary

public DropBoardSummary(Board board)
Constructs a drop board summary that retrieves board information from the supplied board when summarizing.

Method Detail

getHighestColumn

public int getHighestColumn(int startx,
                            int endx)
Returns the column number of the column within the given column range that contains the most pieces.


setBoard

public void setBoard(Board board)
Description copied from class: BoardSummary
Sets the board associated with this board summary, causing an immediate update to this summary.

Overrides:
setBoard in class BoardSummary

summarize

public void summarize()
Description copied from class: BoardSummary
Called by the PuzzleManager to refresh the board summary information by studying the associated board contents.

Specified by:
summarize in class BoardSummary