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
@@ -60,5 +60,8 @@ public interface ParlorService extends InvocationService
// from Java interface ParlorService
function startSolitaire (arg1 :Client, arg2 :GameConfig, arg3 :InvocationService_ConfirmListener) :void;
// from Java interface ParlorService
function startTableNow (arg1 :Client, arg2 :int, arg3 :int, arg4 :InvocationService_InvocationListener) :void;
}
}
@@ -218,6 +218,22 @@ public class TableDirector extends BasicDirector
_pservice.leaveTable(_pctx.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 function startTableNow (tableId :int) :void
{
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
override public function clientDidLogoff (event :ClientEvent) :void
{
@@ -138,5 +138,18 @@ public class ParlorMarshaller extends InvocationMarshaller
arg2, listener3
]);
}
/** The method id used to dispatch {@link #startTableNow} requests. */
public static const START_TABLE_NOW :int = 8;
// from interface ParlorService
public function startTableNow (arg1 :Client, arg2 :int, arg3 :int, arg4 :InvocationService_InvocationListener) :void
{
var listener4 :InvocationMarshaller_ListenerMarshaller = new InvocationMarshaller_ListenerMarshaller();
listener4.listener = arg4;
sendRequest(arg1, START_TABLE_NOW, [
Integer.valueOf(arg2), Integer.valueOf(arg3), listener4
]);
}
}
}