Extract GameManager creation into a specializable method.

git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@489 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
Michael Bayne
2007-11-10 05:03:47 +00:00
parent 4a06907ec0
commit 717beba71f
@@ -327,7 +327,7 @@ public class TableManager
throws InvocationException
{
try {
GameManager gmgr = (GameManager)CrowdServer.plreg.createPlace(createConfig(table));
GameManager gmgr = createGameManager(createConfig(table));
GameObject gobj = (GameObject)gmgr.getPlaceObject();
gameCreated(table, gobj, gmgr);
return gobj.getOid();
@@ -350,6 +350,16 @@ public class TableManager
return table.config;
}
/**
* Creates a {@link GameManager} using the supplied config. Used by {@link #createGame}, but
* extracted into a method to allow customization of this process.
*/
protected GameManager createGameManager (GameConfig config)
throws InstantiationException, InvocationException
{
return (GameManager)CrowdServer.plreg.createPlace(config);
}
/**
* Called when our game has been created, we take this opportunity to clean up the table and
* transition it to "in play" mode.