We need to set the difficulty before we set the board seed because that

triggers the generation of the boards and the difficulty needs to have
been broadcast prior to that.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3040 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2004-06-22 15:35:10 +00:00
parent a4cdf5382e
commit 434a7cafb0
@@ -1,5 +1,5 @@
//
// $Id: PuzzleManager.java,v 1.10 2004/06/22 14:26:10 mdb Exp $
// $Id: PuzzleManager.java,v 1.11 2004/06/22 15:35:10 mdb Exp $
package com.threerings.puzzle.server;
@@ -242,17 +242,17 @@ public abstract class PuzzleManager extends GameManager
// start everyone out with reasonable last progress stamps
Arrays.fill(_lastProgress, System.currentTimeMillis());
// compute the starting difficulty (this has to happen before we
// set the seed because that triggers the generation of the boards
// on the client)
_puzobj.setDifficulty(computeDifficulty());
// initialize the seed that goes out with this round
_puzobj.setSeed(RandomUtil.rand.nextLong());
// initialize the player status
_puzobj.setPlayerStatus(new int[size]);
// compute the starting difficulty
_puzobj.setDifficulty(computeDifficulty());
Log.info("Computed difficulty [game=" + _puzobj.which() +
", difficulty=" + _puzobj.difficulty + "].");
// initialize the player boards
initBoards();