Broke out sending the player-ready signal to the server into a method

so that it can easily be overridden.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3709 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Ray Greenwell
2005-09-23 02:00:52 +00:00
parent 88e72fbbf6
commit ede0d9f471
@@ -108,8 +108,7 @@ public abstract class GameController extends PlaceController
public void run () {
// finally let the game manager know that we're ready
// to roll
Log.info("Reporting ready " + _gobj.which() + ".");
_gobj.gameService.playerReady(_ctx.getClient());
playerReady();
}
});
}
@@ -230,6 +229,16 @@ public abstract class GameController extends PlaceController
return false;
}
/**
* Called after we've entered the game and everything has initialized
* to notify the server that we, as a player, are ready to play.
*/
protected void playerReady ()
{
Log.info("Reporting ready " + _gobj.which() + ".");
_gobj.gameService.playerReady(_ctx.getClient());
}
/**
* Called when the game transitions to the <code>IN_PLAY</code>
* state. This happens when all of the players have arrived and the