Whitespace

git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@1044 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
Dave Hoover
2011-01-01 05:03:18 +00:00
parent 24c3d4ef3e
commit a5e05979ba
2 changed files with 12 additions and 20 deletions
@@ -33,9 +33,8 @@ import com.threerings.presents.net.UsernamePasswordCreds;
import static com.threerings.micasa.Log.log; import static com.threerings.micasa.Log.log;
/** /**
* The micasa app is the main point of entry for the MiCasa client * The micasa app is the main point of entry for the MiCasa client application. It creates and
* application. It creates and initializes the myriad components of the * initializes the myriad components of the client and sets all the proper wheels in motion.
* client and sets all the proper wheels in motion.
*/ */
public class MiCasaApp public class MiCasaApp
{ {
@@ -59,8 +58,7 @@ public class MiCasaApp
try { try {
_client = (MiCasaClient)Class.forName(cclass).newInstance(); _client = (MiCasaClient)Class.forName(cclass).newInstance();
} catch (Exception e) { } catch (Exception e) {
log.warning("Unable to instantiate client class " + log.warning("Unable to instantiate client class", "cclass", cclass, e);
"[cclass=" + cclass + "].", e);
} }
// initialize our client instance // initialize our client instance
@@ -76,14 +74,13 @@ public class MiCasaApp
Client client = _client.getContext().getClient(); Client client = _client.getContext().getClient();
log.info("Using [server=" + server + "."); log.info("Using", "server", server);
client.setServer(server, Client.DEFAULT_SERVER_PORTS); client.setServer(server, Client.DEFAULT_SERVER_PORTS);
// configure the client with some credentials and logon // configure the client with some credentials and logon
if (username != null && password != null) { if (username != null && password != null) {
// create and set our credentials // create and set our credentials
client.setCredentials( client.setCredentials(new UsernamePasswordCreds(new Name(username), password));
new UsernamePasswordCreds(new Name(username), password));
client.logon(); client.logon();
} }
} }
@@ -73,8 +73,7 @@ public class SimulatorManager
public class CreateGameTask public class CreateGameTask
{ {
public CreateGameTask (BodyObject source, GameConfig config, String simClass, public CreateGameTask (BodyObject source, GameConfig config, String simClass,
int playerCount) int playerCount) {
{
// save off game request info // save off game request info
_source = source; _source = source;
_config = config; _config = config;
@@ -94,7 +93,7 @@ public class SimulatorManager
_gmgr = (GameManager)_plreg.createPlace(config); _gmgr = (GameManager)_plreg.createPlace(config);
} catch (Exception e) { } catch (Exception e) {
log.warning("Unable to create game manager [e=" + e + "].", e); log.warning("Unable to create game manager", "e", e, e);
return; return;
} }
@@ -115,8 +114,7 @@ public class SimulatorManager
} }
// resolve the simulant body objects // resolve the simulant body objects
ClientResolutionListener listener = new ClientResolutionListener() ClientResolutionListener listener = new ClientResolutionListener() {
{
public void clientResolved (Name username, ClientObject clobj) { public void clientResolved (Name username, ClientObject clobj) {
// hold onto the body object for later game creation // hold onto the body object for later game creation
_sims.add(clobj); _sims.add(clobj);
@@ -126,7 +124,7 @@ public class SimulatorManager
} }
} }
public void resolutionFailed (Name username, Exception cause) { public void resolutionFailed (Name username, Exception cause) {
log.warning("Unable to create simulant body object [error=" + cause + "]."); log.warning("Unable to create simulant body object", "error", cause);
} }
}; };
@@ -141,8 +139,7 @@ public class SimulatorManager
* Called when all simulant body objects are present and the simulants are ready to be * Called when all simulant body objects are present and the simulants are ready to be
* created. * created.
*/ */
protected void createSimulants () protected void createSimulants () {
{
// finish setting up the simulants // finish setting up the simulants
for (int ii = 1; ii < _playerCount; ii++) { for (int ii = 1; ii < _playerCount; ii++) {
// create the simulant object // create the simulant object
@@ -150,8 +147,7 @@ public class SimulatorManager
try { try {
sim = (Simulant)Class.forName(_simClass).newInstance(); sim = (Simulant)Class.forName(_simClass).newInstance();
} catch (Exception e) { } catch (Exception e) {
log.warning("Unable to create simulant " + log.warning("Unable to create simulant", "class", _simClass);
"[class=" + _simClass + "].");
return; return;
} }
@@ -167,8 +163,7 @@ public class SimulatorManager
try { try {
_locman.moveTo(bobj, _gobj.getOid()); _locman.moveTo(bobj, _gobj.getOid());
} catch (Exception e) { } catch (Exception e) {
log.warning("Failed to move simulant into room " + log.warning("Failed to move simulant into room", "e", e);
"[e=" + e + "].");
return; return;
} }
} }