Actually, moved isDraw() to GameObject, fixed bug..
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3114 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: PuzzleManager.java,v 1.14 2004/09/01 20:35:06 ray Exp $
|
// $Id: PuzzleManager.java,v 1.15 2004/09/01 21:03:11 ray Exp $
|
||||||
//
|
//
|
||||||
// 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
|
||||||
@@ -447,22 +447,14 @@ public abstract class PuzzleManager extends GameManager
|
|||||||
sendStatusUpdate();
|
sendStatusUpdate();
|
||||||
|
|
||||||
// report the winners and losers if appropriate
|
// report the winners and losers if appropriate
|
||||||
if (shouldConcludeGame() && !isDraw()) {
|
int winnerCount = _puzobj.getWinnerCount();
|
||||||
|
if (shouldConcludeGame() && winnerCount > 0 && !_puzobj.isDraw()) {
|
||||||
reportWinnersAndLosers();
|
reportWinnersAndLosers();
|
||||||
}
|
}
|
||||||
|
|
||||||
super.gameDidEnd();
|
super.gameDidEnd();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Is the game a draw?
|
|
||||||
*/
|
|
||||||
protected boolean isDraw ()
|
|
||||||
{
|
|
||||||
int winnerCount = _puzobj.getWinnerCount();
|
|
||||||
return winnerCount > 0 && (winnerCount == _puzobj.getPlayerCount());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Report winner and loser oids to each room that any of the
|
* Report winner and loser oids to each room that any of the
|
||||||
* winners/losers is in.
|
* winners/losers is in.
|
||||||
|
|||||||
Reference in New Issue
Block a user