From 434a7cafb01bb34afe8240cd4266da4b8169f359 Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Tue, 22 Jun 2004 15:35:10 +0000 Subject: [PATCH] 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 --- .../com/threerings/puzzle/server/PuzzleManager.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/java/com/threerings/puzzle/server/PuzzleManager.java b/src/java/com/threerings/puzzle/server/PuzzleManager.java index 072967de5..3f2dad1c9 100644 --- a/src/java/com/threerings/puzzle/server/PuzzleManager.java +++ b/src/java/com/threerings/puzzle/server/PuzzleManager.java @@ -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();