No longer assume that all board summaries are blank at the beginning
of the game- go ahead and initialize them and set them in the game object when the game starts. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3495 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: BoardSummary.java,v 1.3 2004/08/27 02:20:28 mdb Exp $
|
// $Id$
|
||||||
//
|
//
|
||||||
// Narya library - tools for developing networked games
|
// Narya library - tools for developing networked games
|
||||||
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
|
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
|
||||||
@@ -54,11 +54,13 @@ public abstract class BoardSummary extends TrackedStreamableObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the board associated with this board summary.
|
* Sets the board associated with this board summary, causing
|
||||||
|
* an immediate update to this summary.
|
||||||
*/
|
*/
|
||||||
public void setBoard (Board board)
|
public void setBoard (Board board)
|
||||||
{
|
{
|
||||||
_board = board;
|
_board = board;
|
||||||
|
summarize(); // immediately summarize the new board
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: DropBoardSummary.java,v 1.2 2004/08/27 02:20:30 mdb Exp $
|
// $Id$
|
||||||
//
|
//
|
||||||
// Narya library - tools for developing networked games
|
// Narya library - tools for developing networked games
|
||||||
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
|
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
|
||||||
@@ -47,9 +47,6 @@ public class DropBoardSummary extends BoardSummary
|
|||||||
public DropBoardSummary (Board board)
|
public DropBoardSummary (Board board)
|
||||||
{
|
{
|
||||||
super(board);
|
super(board);
|
||||||
|
|
||||||
// create the columns array
|
|
||||||
columns = new byte[_dboard.getWidth()];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -72,9 +69,11 @@ public class DropBoardSummary extends BoardSummary
|
|||||||
// documentation inherited
|
// documentation inherited
|
||||||
public void setBoard (Board board)
|
public void setBoard (Board board)
|
||||||
{
|
{
|
||||||
super.setBoard(board);
|
|
||||||
|
|
||||||
_dboard = (DropBoard)board;
|
_dboard = (DropBoard)board;
|
||||||
|
// create the columns array
|
||||||
|
columns = new byte[_dboard.getWidth()];
|
||||||
|
|
||||||
|
super.setBoard(board);
|
||||||
}
|
}
|
||||||
|
|
||||||
// documentation inherited
|
// documentation inherited
|
||||||
|
|||||||
@@ -389,8 +389,8 @@ public abstract class PuzzleManager extends GameManager
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// these will be sent to the players on the first status update
|
|
||||||
_puzobj.summaries = summaries;
|
_puzobj.setSummaries(summaries);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user