Allow tables to be started (by the creator) when there are at

least the minimum players present.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@106 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
Ray Greenwell
2006-10-06 02:13:20 +00:00
parent 3caec3d8bc
commit 2717fd3b24
9 changed files with 123 additions and 0 deletions
@@ -155,6 +155,16 @@ public interface ParlorService extends InvocationService
public void leaveTable (Client client, int lobbyOid, int tableId,
InvocationListener listener);
/**
* You probably don't want to call this directly, but want to call
* {@link TableDirector#startTableNow}. Requests that the specified
* table be started now, even if all seats are not occupied. This
* will always fail if called by any other player than that seated
* in position 0 (usually the creator).
*/
public void startTableNow (Client client, int lobbyOid, int tableId,
InvocationListener listener);
/**
* Requests to start a single player game with the specified game
* configuration.
@@ -214,6 +214,22 @@ public class TableDirector extends BasicDirector
_pservice.leaveTable(_ctx.getClient(), _lobby.getOid(), tableId, this);
}
/**
* Sends a request to have the specified table start now, even if
* all the seats have not yet been filled.
*/
public void startTableNow (int tableId)
{
if (_lobby == null) {
Log.warning("Requested to start a table but we're not " +
"currently in a place [tableId=" + tableId + "].");
return;
}
_pservice.startTableNow(_ctx.getClient(), _lobby.getOid(),
tableId, this);
}
// documentation inherited
public void clientDidLogoff (Client client)
{