Added isDraw().

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3113 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Ray Greenwell
2004-09-01 21:02:44 +00:00
parent 23a843d79b
commit 7122d9afe8
2 changed files with 18 additions and 2 deletions
@@ -1,5 +1,5 @@
//
// $Id: GameObject.dobj,v 1.21 2004/03/06 11:29:19 mdb Exp $
// $Id: GameObject.dobj,v 1.22 2004/09/01 21:02:44 ray Exp $
package com.threerings.parlor.game;
@@ -129,6 +129,14 @@ public class GameObject extends PlaceObject
return count;
}
/**
* Returns true if the game is ended in a draw.
*/
public boolean isDraw ()
{
return getWinnerCount() == getPlayerCount();
}
/**
* Returns the winner index of the first winning player for this game,
* or <code>-1</code> if there are no winners or the winners array is
@@ -1,5 +1,5 @@
//
// $Id: GameObject.java,v 1.20 2004/08/27 02:20:14 mdb Exp $
// $Id: GameObject.java,v 1.21 2004/09/01 21:02:44 ray Exp $
//
// Narya library - tools for developing networked games
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
@@ -168,6 +168,14 @@ public class GameObject extends PlaceObject
return count;
}
/**
* Returns true if the game is ended in a draw.
*/
public boolean isDraw ()
{
return getWinnerCount() == getPlayerCount();
}
/**
* Returns the winner index of the first winning player for this game,
* or <code>-1</code> if there are no winners or the winners array is