//
// $Id$

package @package@;

import com.threerings.crowd.client.PlaceView;
import com.threerings.crowd.data.PlaceObject;
import com.threerings.crowd.util.CrowdContext;

import com.threerings.parlor.game.client.GameController;
import com.threerings.toybox.data.ToyBoxGameConfig;
import com.threerings.toybox.util.ToyBoxContext;

/**
 * Manages the client side mechanics of the game.
 */
public class @classpre@Controller extends GameController
{
    /**
     * Requests that we leave the game and return to the lobby.
     */
    public void backToLobby ()
    {
        _ctx.getLocationDirector().moveBack();
    }

    @Override // from PlaceController
    protected PlaceView createPlaceView (CrowdContext ctx)
    {
        _panel = new @classpre@Panel((ToyBoxContext)ctx, this);
        return _panel;
    }

    @Override // from PlaceController
    public void willEnterPlace (PlaceObject plobj)
    {
        super.willEnterPlace(plobj);

        // get a casted reference to our game object
        _gameobj = (@classpre@Object)plobj;
    }

    @Override // from PlaceController
    public void didLeavePlace (PlaceObject plobj)
    {
        super.didLeavePlace(plobj);

        // clear out our game object reference
        _gameobj = null;
    }

    @Override // from GameController
    protected void gameDidStart ()
    {
        super.gameDidStart();

        // here we can set up anything that should happen at the start of the
        // game
    }

    @Override // from GameController
    protected void gameDidEnd ()
    {
        super.gameDidEnd();

        // here we can clear out anything that needs to be cleared out at the
        // end of a game
    }

    /** Our game panel. */
    protected @classpre@Panel _panel;

    /** Our game distributed object. */
    protected @classpre@Object _gameobj;
}

@@ -616,205 +616,8 @@
  %7D%0A%0A
-    @Override // from PlaceController%0A    protected PlaceView createPlaceView (CrowdContext ctx)%0A    %7B%0A        _panel = new @classpre@Panel((ToyBoxContext)ctx, this);%0A        return _panel;%0A    %7D%0A%0A
     
@@ -1051,32 +1051,229 @@
  = null;%0A    %7D%0A%0A
+    @Override // from PlaceController%0A    protected PlaceView createPlaceView (CrowdContext ctx)%0A    %7B%0A        _panel = new @classpre@Panel((ToyBoxContext)ctx, this);%0A        return _panel;%0A    %7D%0A%0A
     @Override //

Put methods in the right order.