Decided to take the pain and refactor the parlor.game and parlor.turn

packages properly into client, data and server subpackages. This
eliminates a bunch of hackery I had to do to properly handle dead code
removal when building the Game Gardens client and games and it simplifies
things and sets a good example to follow the standard procedure as much as
possible.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3381 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2005-03-03 19:36:34 +00:00
parent c2e2661e66
commit dbbd8e955f
66 changed files with 145 additions and 111 deletions
@@ -28,7 +28,7 @@ import java.util.Properties;
import com.samskivert.util.StringUtil; import com.samskivert.util.StringUtil;
import com.threerings.crowd.data.PlaceConfig; import com.threerings.crowd.data.PlaceConfig;
import com.threerings.parlor.game.GameConfig; import com.threerings.parlor.game.data.GameConfig;
import com.threerings.micasa.util.MiCasaContext; import com.threerings.micasa.util.MiCasaContext;
public class LobbyConfig extends PlaceConfig public class LobbyConfig extends PlaceConfig
@@ -1,5 +1,5 @@
// //
// $Id: LobbyController.java,v 1.11 2004/08/27 02:12:50 mdb Exp $ // $Id$
// //
// Narya library - tools for developing networked games // Narya library - tools for developing networked games
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved // Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
@@ -30,7 +30,7 @@ import com.threerings.crowd.client.PlaceView;
import com.threerings.crowd.util.CrowdContext; import com.threerings.crowd.util.CrowdContext;
import com.threerings.parlor.client.*; import com.threerings.parlor.client.*;
import com.threerings.parlor.game.GameConfig; import com.threerings.parlor.game.data.GameConfig;
import com.threerings.micasa.Log; import com.threerings.micasa.Log;
import com.threerings.micasa.util.MiCasaContext; import com.threerings.micasa.util.MiCasaContext;
@@ -44,7 +44,7 @@ import com.threerings.parlor.client.SeatednessObserver;
import com.threerings.parlor.client.TableDirector; import com.threerings.parlor.client.TableDirector;
import com.threerings.parlor.client.TableObserver; import com.threerings.parlor.client.TableObserver;
import com.threerings.parlor.data.Table; import com.threerings.parlor.data.Table;
import com.threerings.parlor.game.GameConfig; import com.threerings.parlor.game.data.GameConfig;
import com.threerings.crowd.client.PlaceView; import com.threerings.crowd.client.PlaceView;
import com.threerings.crowd.data.PlaceObject; import com.threerings.crowd.data.PlaceObject;
@@ -1,5 +1,5 @@
// //
// $Id: SimulatorController.java,v 1.3 2004/08/27 02:12:52 mdb Exp $ // $Id$
// //
// Narya library - tools for developing networked games // Narya library - tools for developing networked games
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved // Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
@@ -29,7 +29,7 @@ import com.threerings.presents.client.SessionObserver;
import com.threerings.crowd.data.BodyObject; import com.threerings.crowd.data.BodyObject;
import com.threerings.parlor.game.GameConfig; import com.threerings.parlor.game.data.GameConfig;
import com.threerings.parlor.util.ParlorContext; import com.threerings.parlor.util.ParlorContext;
import com.threerings.micasa.Log; import com.threerings.micasa.Log;
@@ -1,5 +1,5 @@
// //
// $Id: SimulatorService.java,v 1.2 2004/08/27 02:12:52 mdb Exp $ // $Id$
// //
// Narya library - tools for developing networked games // Narya library - tools for developing networked games
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved // Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
@@ -24,7 +24,7 @@ package com.threerings.micasa.simulator.client;
import com.threerings.presents.client.Client; import com.threerings.presents.client.Client;
import com.threerings.presents.client.InvocationService; import com.threerings.presents.client.InvocationService;
import com.threerings.parlor.game.GameConfig; import com.threerings.parlor.game.data.GameConfig;
/** /**
* Provides access to simulator invocation services. * Provides access to simulator invocation services.
@@ -22,7 +22,7 @@
package com.threerings.micasa.simulator.data; package com.threerings.micasa.simulator.data;
import com.threerings.micasa.simulator.client.SimulatorService; import com.threerings.micasa.simulator.client.SimulatorService;
import com.threerings.parlor.game.GameConfig; import com.threerings.parlor.game.data.GameConfig;
import com.threerings.presents.client.Client; import com.threerings.presents.client.Client;
import com.threerings.presents.data.InvocationMarshaller; import com.threerings.presents.data.InvocationMarshaller;
import com.threerings.presents.dobj.InvocationResponseEvent; import com.threerings.presents.dobj.InvocationResponseEvent;
@@ -1,5 +1,5 @@
// //
// $Id: Simulant.java,v 1.5 2004/08/27 02:12:54 mdb Exp $ // $Id$
// //
// Narya library - tools for developing networked games // Narya library - tools for developing networked games
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved // Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
@@ -27,8 +27,8 @@ import com.threerings.presents.dobj.MessageEvent;
import com.threerings.crowd.data.BodyObject; import com.threerings.crowd.data.BodyObject;
import com.threerings.crowd.data.PlaceObject; import com.threerings.crowd.data.PlaceObject;
import com.threerings.parlor.game.GameConfig; import com.threerings.parlor.game.data.GameConfig;
import com.threerings.parlor.game.GameManager; import com.threerings.parlor.game.server.GameManager;
public abstract class Simulant public abstract class Simulant
{ {
@@ -23,7 +23,7 @@ package com.threerings.micasa.simulator.server;
import com.threerings.micasa.simulator.client.SimulatorService; import com.threerings.micasa.simulator.client.SimulatorService;
import com.threerings.micasa.simulator.data.SimulatorMarshaller; import com.threerings.micasa.simulator.data.SimulatorMarshaller;
import com.threerings.parlor.game.GameConfig; import com.threerings.parlor.game.data.GameConfig;
import com.threerings.presents.client.Client; import com.threerings.presents.client.Client;
import com.threerings.presents.data.ClientObject; import com.threerings.presents.data.ClientObject;
import com.threerings.presents.data.InvocationMarshaller; import com.threerings.presents.data.InvocationMarshaller;
@@ -1,5 +1,5 @@
// //
// $Id: SimulatorManager.java,v 1.18 2004/10/22 19:27:54 ray Exp $ // $Id$
// //
// Narya library - tools for developing networked games // Narya library - tools for developing networked games
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved // Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
@@ -37,9 +37,9 @@ import com.threerings.crowd.server.PlaceManager;
import com.threerings.crowd.server.PlaceRegistry.CreationObserver; import com.threerings.crowd.server.PlaceRegistry.CreationObserver;
import com.threerings.crowd.server.PlaceRegistry; import com.threerings.crowd.server.PlaceRegistry;
import com.threerings.parlor.game.GameConfig; import com.threerings.parlor.game.data.GameConfig;
import com.threerings.parlor.game.GameManager; import com.threerings.parlor.game.data.GameObject;
import com.threerings.parlor.game.GameObject; import com.threerings.parlor.game.server.GameManager;
import com.threerings.micasa.Log; import com.threerings.micasa.Log;
@@ -1,5 +1,5 @@
// //
// $Id: SimulatorProvider.java,v 1.4 2004/08/27 02:12:54 mdb Exp $ // $Id$
// //
// Narya library - tools for developing networked games // Narya library - tools for developing networked games
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved // Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
@@ -25,7 +25,7 @@ import com.threerings.presents.data.ClientObject;
import com.threerings.presents.server.InvocationProvider; import com.threerings.presents.server.InvocationProvider;
import com.threerings.crowd.data.BodyObject; import com.threerings.crowd.data.BodyObject;
import com.threerings.parlor.game.GameConfig; import com.threerings.parlor.game.data.GameConfig;
import com.threerings.micasa.Log; import com.threerings.micasa.Log;
@@ -27,7 +27,7 @@ import com.threerings.parlor.card.data.Card;
import com.threerings.parlor.card.data.CardCodes; import com.threerings.parlor.card.data.CardCodes;
import com.threerings.parlor.card.data.Hand; import com.threerings.parlor.card.data.Hand;
import com.threerings.parlor.game.GameController; import com.threerings.parlor.game.client.GameController;
/** /**
* A controller class for card games. Handles common functions like * A controller class for card games. Handles common functions like
@@ -21,7 +21,7 @@
package com.threerings.parlor.card.data; package com.threerings.parlor.card.data;
import com.threerings.parlor.game.GameObject; import com.threerings.parlor.game.data.GameObject;
/** /**
* Game object class for card games. * Game object class for card games.
@@ -32,7 +32,7 @@ import com.threerings.parlor.card.data.CardGameObject;
import com.threerings.parlor.card.data.Deck; import com.threerings.parlor.card.data.Deck;
import com.threerings.parlor.card.data.Hand; import com.threerings.parlor.card.data.Hand;
import com.threerings.parlor.game.GameManager; import com.threerings.parlor.game.server.GameManager;
import com.threerings.presents.client.InvocationService.ConfirmListener; import com.threerings.presents.client.InvocationService.ConfirmListener;
import com.threerings.presents.data.ClientObject; import com.threerings.presents.data.ClientObject;
@@ -1,5 +1,5 @@
// //
// $Id: TrickCardGameController.java,v 1.2 2004/10/15 00:14:23 andrzej Exp $ // $Id$
// //
// Narya library - tools for developing networked games // Narya library - tools for developing networked games
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved // Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
@@ -21,7 +21,7 @@
package com.threerings.parlor.card.trick; package com.threerings.parlor.card.trick;
import com.threerings.parlor.turn.TurnGameController; import com.threerings.parlor.turn.client.TurnGameController;
/** /**
* A card game controller interface for trick-based card games, such as * A card game controller interface for trick-based card games, such as
@@ -21,7 +21,7 @@
package com.threerings.parlor.card.trick; package com.threerings.parlor.card.trick;
import com.threerings.parlor.turn.TurnGameControllerDelegate; import com.threerings.parlor.turn.client.TurnGameControllerDelegate;
import com.threerings.presents.dobj.AttributeChangedEvent; import com.threerings.presents.dobj.AttributeChangedEvent;
@@ -1,5 +1,5 @@
// //
// $Id: TrickCardGameManager.java,v 1.2 2004/10/15 00:14:23 andrzej Exp $ // $Id$
// //
// Narya library - tools for developing networked games // Narya library - tools for developing networked games
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved // Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
@@ -21,7 +21,7 @@
package com.threerings.parlor.card.trick; package com.threerings.parlor.card.trick;
import com.threerings.parlor.turn.TurnGameManager; import com.threerings.parlor.turn.server.TurnGameManager;
/** /**
* A card game manager interface for trick-based card games, such as * A card game manager interface for trick-based card games, such as
@@ -23,9 +23,9 @@ package com.threerings.parlor.card.trick;
import com.threerings.crowd.data.PlaceObject; import com.threerings.crowd.data.PlaceObject;
import com.threerings.parlor.game.GameManager; import com.threerings.parlor.game.server.GameManager;
import com.threerings.parlor.turn.TurnGameManagerDelegate; import com.threerings.parlor.turn.server.TurnGameManagerDelegate;
/** /**
* A card game manager delegate for trick-based card games, such as * A card game manager delegate for trick-based card games, such as
@@ -1,5 +1,5 @@
// //
// $Id: TrickCardGameObject.java,v 1.2 2004/10/15 00:14:23 andrzej Exp $ // $Id$
// //
// Narya library - tools for developing networked games // Narya library - tools for developing networked games
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved // Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
@@ -21,7 +21,7 @@
package com.threerings.parlor.card.trick; package com.threerings.parlor.card.trick;
import com.threerings.parlor.turn.TurnGameObject; import com.threerings.parlor.turn.data.TurnGameObject;
/** /**
* Game objects for trick-based card games must implement this interface. * Game objects for trick-based card games must implement this interface.
@@ -24,7 +24,7 @@ package com.threerings.parlor.client;
import javax.swing.JPanel; import javax.swing.JPanel;
import com.samskivert.swing.VGroupLayout; import com.samskivert.swing.VGroupLayout;
import com.threerings.parlor.game.GameConfig; import com.threerings.parlor.game.data.GameConfig;
import com.threerings.parlor.util.ParlorContext; import com.threerings.parlor.util.ParlorContext;
/** /**
@@ -1,5 +1,5 @@
// //
// $Id: Invitation.java,v 1.4 2004/08/27 02:20:12 mdb Exp $ // $Id$
// //
// Narya library - tools for developing networked games // Narya library - tools for developing networked games
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved // Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
@@ -25,7 +25,7 @@ import com.threerings.util.Name;
import com.threerings.parlor.Log; import com.threerings.parlor.Log;
import com.threerings.parlor.data.ParlorCodes; import com.threerings.parlor.data.ParlorCodes;
import com.threerings.parlor.game.GameConfig; import com.threerings.parlor.game.data.GameConfig;
import com.threerings.parlor.util.ParlorContext; import com.threerings.parlor.util.ParlorContext;
/** /**
@@ -1,5 +1,5 @@
// //
// $Id: InvitationResponseObserver.java,v 1.7 2004/08/27 02:20:12 mdb Exp $ // $Id$
// //
// Narya library - tools for developing networked games // Narya library - tools for developing networked games
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved // Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
@@ -21,7 +21,7 @@
package com.threerings.parlor.client; package com.threerings.parlor.client;
import com.threerings.parlor.game.GameConfig; import com.threerings.parlor.game.data.GameConfig;
/** /**
* A client entity that wishes to generate invitations for games must * A client entity that wishes to generate invitations for games must
@@ -4,7 +4,7 @@
package com.threerings.parlor.client; package com.threerings.parlor.client;
import com.threerings.parlor.client.ParlorReceiver; import com.threerings.parlor.client.ParlorReceiver;
import com.threerings.parlor.game.GameConfig; import com.threerings.parlor.game.data.GameConfig;
import com.threerings.presents.client.InvocationDecoder; import com.threerings.presents.client.InvocationDecoder;
import com.threerings.util.Name; import com.threerings.util.Name;
@@ -32,7 +32,7 @@ import com.threerings.presents.client.InvocationService;
import com.threerings.parlor.Log; import com.threerings.parlor.Log;
import com.threerings.parlor.data.ParlorCodes; import com.threerings.parlor.data.ParlorCodes;
import com.threerings.parlor.game.GameConfig; import com.threerings.parlor.game.data.GameConfig;
import com.threerings.parlor.util.ParlorContext; import com.threerings.parlor.util.ParlorContext;
/** /**
@@ -26,7 +26,7 @@ import com.threerings.util.Name;
import com.threerings.presents.client.InvocationReceiver; import com.threerings.presents.client.InvocationReceiver;
import com.threerings.parlor.data.ParlorCodes; import com.threerings.parlor.data.ParlorCodes;
import com.threerings.parlor.game.GameConfig; import com.threerings.parlor.game.data.GameConfig;
/** /**
* Defines, for the parlor services, a set of notifications delivered * Defines, for the parlor services, a set of notifications delivered
@@ -26,7 +26,7 @@ import com.threerings.util.Name;
import com.threerings.presents.client.Client; import com.threerings.presents.client.Client;
import com.threerings.presents.client.InvocationService; import com.threerings.presents.client.InvocationService;
import com.threerings.parlor.game.GameConfig; import com.threerings.parlor.game.data.GameConfig;
/** /**
* Provides an interface to the various parlor invocation services. * Provides an interface to the various parlor invocation services.
@@ -37,7 +37,7 @@ import com.threerings.crowd.data.PlaceObject;
import com.threerings.parlor.Log; import com.threerings.parlor.Log;
import com.threerings.parlor.data.Table; import com.threerings.parlor.data.Table;
import com.threerings.parlor.data.TableLobbyObject; import com.threerings.parlor.data.TableLobbyObject;
import com.threerings.parlor.game.GameConfig; import com.threerings.parlor.game.data.GameConfig;
import com.threerings.parlor.util.ParlorContext; import com.threerings.parlor.util.ParlorContext;
/** /**
@@ -22,7 +22,7 @@
package com.threerings.parlor.data; package com.threerings.parlor.data;
import com.threerings.parlor.client.ParlorService; import com.threerings.parlor.client.ParlorService;
import com.threerings.parlor.game.GameConfig; import com.threerings.parlor.game.data.GameConfig;
import com.threerings.presents.client.Client; import com.threerings.presents.client.Client;
import com.threerings.presents.client.InvocationService; import com.threerings.presents.client.InvocationService;
import com.threerings.presents.data.InvocationMarshaller; import com.threerings.presents.data.InvocationMarshaller;
@@ -31,7 +31,7 @@ import com.threerings.util.Name;
import com.threerings.presents.dobj.DSet; import com.threerings.presents.dobj.DSet;
import com.threerings.parlor.data.ParlorCodes; import com.threerings.parlor.data.ParlorCodes;
import com.threerings.parlor.game.GameConfig; import com.threerings.parlor.game.data.GameConfig;
/** /**
* This class represents a table that is being used to matchmake a game by * This class represents a table that is being used to matchmake a game by
@@ -19,7 +19,7 @@
// License along with this library; if not, write to the Free Software // License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
package com.threerings.parlor.game; package com.threerings.parlor.game.client;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
@@ -34,6 +34,10 @@ import com.threerings.crowd.data.PlaceObject;
import com.threerings.crowd.util.CrowdContext; import com.threerings.crowd.util.CrowdContext;
import com.threerings.parlor.Log; import com.threerings.parlor.Log;
import com.threerings.parlor.game.data.GameCodes;
import com.threerings.parlor.game.data.GameConfig;
import com.threerings.parlor.game.data.GameObject;
import com.threerings.parlor.game.data.PartyGameConfig;
import com.threerings.parlor.util.ParlorContext; import com.threerings.parlor.util.ParlorContext;
/** /**
@@ -1,5 +1,5 @@
// //
// $Id: GameControllerDelegate.java,v 1.3 2004/08/27 02:20:14 mdb Exp $ // $Id$
// //
// Narya library - tools for developing networked games // Narya library - tools for developing networked games
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved // Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
@@ -19,7 +19,7 @@
// License along with this library; if not, write to the Free Software // License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
package com.threerings.parlor.game; package com.threerings.parlor.game.client;
import com.threerings.crowd.client.PlaceControllerDelegate; import com.threerings.crowd.client.PlaceControllerDelegate;
@@ -1,5 +1,5 @@
// //
// $Id: GameService.java,v 1.3 2004/08/27 02:20:14 mdb Exp $ // $Id$
// //
// Narya library - tools for developing networked games // Narya library - tools for developing networked games
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved // Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
@@ -19,7 +19,7 @@
// License along with this library; if not, write to the Free Software // License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
package com.threerings.parlor.game; package com.threerings.parlor.game.client;
import com.threerings.presents.client.Client; import com.threerings.presents.client.Client;
import com.threerings.presents.client.InvocationService; import com.threerings.presents.client.InvocationService;
@@ -19,7 +19,7 @@
// License along with this library; if not, write to the Free Software // License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
package com.threerings.parlor.game; package com.threerings.parlor.game.data;
import com.threerings.presents.data.InvocationCodes; import com.threerings.presents.data.InvocationCodes;
@@ -19,7 +19,7 @@
// License along with this library; if not, write to the Free Software // License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
package com.threerings.parlor.game; package com.threerings.parlor.game.data;
import com.threerings.crowd.data.PlaceConfig; import com.threerings.crowd.data.PlaceConfig;
import com.threerings.util.Name; import com.threerings.util.Name;
@@ -19,9 +19,9 @@
// License along with this library; if not, write to the Free Software // License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
package com.threerings.parlor.game; package com.threerings.parlor.game.data;
import com.threerings.parlor.game.GameService; import com.threerings.parlor.game.client.GameService;
import com.threerings.presents.client.Client; import com.threerings.presents.client.Client;
import com.threerings.presents.data.InvocationMarshaller; import com.threerings.presents.data.InvocationMarshaller;
import com.threerings.presents.dobj.InvocationResponseEvent; import com.threerings.presents.dobj.InvocationResponseEvent;
@@ -19,7 +19,7 @@
// License along with this library; if not, write to the Free Software // License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
package com.threerings.parlor.game; package com.threerings.parlor.game.data;
import com.samskivert.util.ListUtil; import com.samskivert.util.ListUtil;
import com.samskivert.util.StringUtil; import com.samskivert.util.StringUtil;
@@ -19,7 +19,7 @@
// License along with this library; if not, write to the Free Software // License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
package com.threerings.parlor.game; package com.threerings.parlor.game.data;
import com.threerings.parlor.data.TableConfig; import com.threerings.parlor.data.TableConfig;
@@ -1,5 +1,5 @@
// //
// $Id: TeamGameConfig.java,v 1.1 2004/11/04 23:31:10 andrzej Exp $ // $Id$
// //
// Narya library - tools for developing networked games // Narya library - tools for developing networked games
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved // Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
@@ -19,7 +19,7 @@
// License along with this library; if not, write to the Free Software // License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
package com.threerings.parlor.game; package com.threerings.parlor.game.data;
import com.threerings.parlor.data.TableConfig; import com.threerings.parlor.data.TableConfig;
@@ -1,7 +1,7 @@
// //
// $Id: AI.java,v 1.1 2004/10/22 19:27:54 ray Exp $ // $Id$
package com.threerings.parlor.game; package com.threerings.parlor.game.server;
/** /**
* Represents attributes of an AI player. * Represents attributes of an AI player.
@@ -19,7 +19,7 @@
// License along with this library; if not, write to the Free Software // License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
package com.threerings.parlor.game; package com.threerings.parlor.game.server;
import java.util.Iterator; import java.util.Iterator;
import java.util.HashSet; import java.util.HashSet;
@@ -19,10 +19,10 @@
// License along with this library; if not, write to the Free Software // License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
package com.threerings.parlor.game; package com.threerings.parlor.game.server;
import com.threerings.parlor.game.GameMarshaller; import com.threerings.parlor.game.data.GameMarshaller;
import com.threerings.parlor.game.GameService; import com.threerings.parlor.game.client.GameService;
import com.threerings.presents.client.Client; import com.threerings.presents.client.Client;
import com.threerings.presents.data.ClientObject; import com.threerings.presents.data.ClientObject;
import com.threerings.presents.data.InvocationMarshaller; import com.threerings.presents.data.InvocationMarshaller;
@@ -19,7 +19,7 @@
// License along with this library; if not, write to the Free Software // License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
package com.threerings.parlor.game; package com.threerings.parlor.game.server;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
@@ -45,6 +45,11 @@ import com.threerings.crowd.server.PlaceManagerDelegate;
import com.threerings.parlor.Log; import com.threerings.parlor.Log;
import com.threerings.parlor.data.ParlorCodes; import com.threerings.parlor.data.ParlorCodes;
import com.threerings.parlor.game.data.GameCodes;
import com.threerings.parlor.game.data.GameConfig;
import com.threerings.parlor.game.data.GameMarshaller;
import com.threerings.parlor.game.data.GameObject;
import com.threerings.parlor.game.data.PartyGameConfig;
import com.threerings.parlor.server.ParlorSender; import com.threerings.parlor.server.ParlorSender;
/** /**
@@ -19,7 +19,7 @@
// License along with this library; if not, write to the Free Software // License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
package com.threerings.parlor.game; package com.threerings.parlor.game.server;
import com.threerings.crowd.server.PlaceManagerDelegate; import com.threerings.crowd.server.PlaceManagerDelegate;
@@ -1,5 +1,5 @@
// //
// $Id: GameProvider.java,v 1.3 2004/08/27 02:20:14 mdb Exp $ // $Id$
// //
// Narya library - tools for developing networked games // Narya library - tools for developing networked games
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved // Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
@@ -19,7 +19,7 @@
// License along with this library; if not, write to the Free Software // License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
package com.threerings.parlor.game; package com.threerings.parlor.game.server;
import com.threerings.presents.data.ClientObject; import com.threerings.presents.data.ClientObject;
import com.threerings.presents.server.InvocationProvider; import com.threerings.presents.server.InvocationProvider;
@@ -1,5 +1,5 @@
// //
// $Id: GameWatcher.java,v 1.3 2004/08/27 02:20:14 mdb Exp $ // $Id$
// //
// Narya library - tools for developing networked games // Narya library - tools for developing networked games
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved // Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
@@ -19,7 +19,7 @@
// License along with this library; if not, write to the Free Software // License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
package com.threerings.parlor.game; package com.threerings.parlor.game.server;
import com.threerings.presents.dobj.AttributeChangeListener; import com.threerings.presents.dobj.AttributeChangeListener;
import com.threerings.presents.dobj.AttributeChangedEvent; import com.threerings.presents.dobj.AttributeChangedEvent;
@@ -28,6 +28,8 @@ import com.threerings.crowd.data.PlaceObject;
import com.threerings.crowd.server.PlaceManager; import com.threerings.crowd.server.PlaceManager;
import com.threerings.crowd.server.PlaceRegistry; import com.threerings.crowd.server.PlaceRegistry;
import com.threerings.parlor.game.data.GameObject;
/** /**
* An abstract convenience class used server-side to keep an eye on a game * An abstract convenience class used server-side to keep an eye on a game
* and perform a one-time game-over activity when the game ends. Classes * and perform a one-time game-over activity when the game ends. Classes
@@ -23,7 +23,7 @@ package com.threerings.parlor.server;
import com.threerings.parlor.client.ParlorService; import com.threerings.parlor.client.ParlorService;
import com.threerings.parlor.data.ParlorMarshaller; import com.threerings.parlor.data.ParlorMarshaller;
import com.threerings.parlor.game.GameConfig; import com.threerings.parlor.game.data.GameConfig;
import com.threerings.presents.client.Client; import com.threerings.presents.client.Client;
import com.threerings.presents.client.InvocationService; import com.threerings.presents.client.InvocationService;
import com.threerings.presents.data.ClientObject; import com.threerings.presents.data.ClientObject;
@@ -1,5 +1,5 @@
// //
// $Id: ParlorManager.java,v 1.22 2004/08/27 02:20:14 mdb Exp $ // $Id$
// //
// Narya library - tools for developing networked games // Narya library - tools for developing networked games
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved // Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
@@ -32,8 +32,8 @@ import com.threerings.crowd.server.PlaceRegistry;
import com.threerings.parlor.Log; import com.threerings.parlor.Log;
import com.threerings.parlor.data.ParlorCodes; import com.threerings.parlor.data.ParlorCodes;
import com.threerings.parlor.game.GameConfig; import com.threerings.parlor.game.data.GameConfig;
import com.threerings.parlor.game.GameManager; import com.threerings.parlor.game.server.GameManager;
/** /**
* The parlor manager is responsible for the parlor services in * The parlor manager is responsible for the parlor services in
@@ -37,8 +37,8 @@ import com.threerings.parlor.Log;
import com.threerings.parlor.client.ParlorService.InviteListener; import com.threerings.parlor.client.ParlorService.InviteListener;
import com.threerings.parlor.client.ParlorService.TableListener; import com.threerings.parlor.client.ParlorService.TableListener;
import com.threerings.parlor.data.ParlorCodes; import com.threerings.parlor.data.ParlorCodes;
import com.threerings.parlor.game.GameConfig; import com.threerings.parlor.game.data.GameConfig;
import com.threerings.parlor.game.GameManager; import com.threerings.parlor.game.server.GameManager;
/** /**
* The parlor provider handles the server side of the various Parlor * The parlor provider handles the server side of the various Parlor
@@ -5,7 +5,7 @@ package com.threerings.parlor.server;
import com.threerings.parlor.client.ParlorDecoder; import com.threerings.parlor.client.ParlorDecoder;
import com.threerings.parlor.client.ParlorReceiver; import com.threerings.parlor.client.ParlorReceiver;
import com.threerings.parlor.game.GameConfig; import com.threerings.parlor.game.data.GameConfig;
import com.threerings.presents.data.ClientObject; import com.threerings.presents.data.ClientObject;
import com.threerings.presents.server.InvocationSender; import com.threerings.presents.server.InvocationSender;
import com.threerings.util.Name; import com.threerings.util.Name;
@@ -46,8 +46,8 @@ import com.threerings.parlor.data.ParlorCodes;
import com.threerings.parlor.data.Table; import com.threerings.parlor.data.Table;
import com.threerings.parlor.data.TableConfig; import com.threerings.parlor.data.TableConfig;
import com.threerings.parlor.data.TableLobbyObject; import com.threerings.parlor.data.TableLobbyObject;
import com.threerings.parlor.game.GameConfig; import com.threerings.parlor.game.data.GameConfig;
import com.threerings.parlor.game.GameManager; import com.threerings.parlor.game.server.GameManager;
/** /**
* A table manager can be used by a place manager to take care of the * A table manager can be used by a place manager to take care of the
@@ -1,7 +1,25 @@
// //
// $Id$ // $Id$
//
// Narya library - tools for developing networked games
// Copyright (C) 2002-2005 Three Rings Design, Inc., All Rights Reserved
// http://www.threerings.net/code/narya/
//
// This library is free software; you can redistribute it and/or modify it
// under the terms of the GNU Lesser General Public License as published
// by the Free Software Foundation; either version 2.1 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
package com.threerings.parlor.turn; package com.threerings.parlor.turn.client;
import java.awt.Color; import java.awt.Color;
import java.awt.GridBagConstraints; import java.awt.GridBagConstraints;
@@ -22,8 +40,8 @@ import com.threerings.util.Name;
import com.threerings.crowd.client.PlaceView; import com.threerings.crowd.client.PlaceView;
import com.threerings.crowd.data.PlaceObject; import com.threerings.crowd.data.PlaceObject;
import com.threerings.parlor.game.GameObject; import com.threerings.parlor.game.data.GameObject;
import com.threerings.parlor.turn.TurnGameObject; import com.threerings.parlor.turn.data.TurnGameObject;
import com.threerings.presents.dobj.AttributeChangeListener; import com.threerings.presents.dobj.AttributeChangeListener;
import com.threerings.presents.dobj.AttributeChangedEvent; import com.threerings.presents.dobj.AttributeChangedEvent;
@@ -19,11 +19,11 @@
// License along with this library; if not, write to the Free Software // License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
package com.threerings.parlor.turn; package com.threerings.parlor.turn.client;
import com.threerings.util.Name; import com.threerings.util.Name;
import com.threerings.parlor.game.GameController; import com.threerings.parlor.game.client.GameController;
/** /**
* Games that wish to make use of the turn game services should have their * Games that wish to make use of the turn game services should have their
@@ -1,5 +1,5 @@
// //
// $Id: TurnGameControllerDelegate.java,v 1.6 2004/08/27 02:20:15 mdb Exp $ // $Id$
// //
// Narya library - tools for developing networked games // Narya library - tools for developing networked games
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved // Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
@@ -19,7 +19,7 @@
// License along with this library; if not, write to the Free Software // License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
package com.threerings.parlor.turn; package com.threerings.parlor.turn.client;
import com.threerings.util.Name; import com.threerings.util.Name;
@@ -31,9 +31,11 @@ import com.threerings.crowd.data.PlaceConfig;
import com.threerings.crowd.data.PlaceObject; import com.threerings.crowd.data.PlaceObject;
import com.threerings.crowd.util.CrowdContext; import com.threerings.crowd.util.CrowdContext;
import com.threerings.parlor.game.GameController; import com.threerings.parlor.game.client.GameController;
import com.threerings.parlor.game.GameControllerDelegate; import com.threerings.parlor.game.client.GameControllerDelegate;
import com.threerings.parlor.game.GameObject; import com.threerings.parlor.game.data.GameObject;
import com.threerings.parlor.turn.data.TurnGameObject;
/** /**
* Performs the client-side processing for a turn-based game. Games which * Performs the client-side processing for a turn-based game. Games which
@@ -19,11 +19,11 @@
// License along with this library; if not, write to the Free Software // License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
package com.threerings.parlor.turn; package com.threerings.parlor.turn.data;
import com.threerings.util.Name; import com.threerings.util.Name;
import com.threerings.parlor.game.GameObject; import com.threerings.parlor.game.data.GameObject;
/** /**
* Games that wish to support turn-based play must implement this * Games that wish to support turn-based play must implement this
@@ -19,11 +19,11 @@
// License along with this library; if not, write to the Free Software // License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
package com.threerings.parlor.turn; package com.threerings.parlor.turn.server;
import com.threerings.util.Name; import com.threerings.util.Name;
import com.threerings.parlor.game.GameManager; import com.threerings.parlor.game.server.GameManager;
/** /**
* A game manager that wishes to make use of the turn game services should * A game manager that wishes to make use of the turn game services should
@@ -1,5 +1,5 @@
// //
// $Id: TurnGameManagerDelegate.java,v 1.10 2004/08/27 02:20:15 mdb Exp $ // $Id$
// //
// Narya library - tools for developing networked games // Narya library - tools for developing networked games
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved // Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
@@ -19,7 +19,7 @@
// License along with this library; if not, write to the Free Software // License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
package com.threerings.parlor.turn; package com.threerings.parlor.turn.server;
import com.threerings.util.Name; import com.threerings.util.Name;
import com.threerings.util.RandomUtil; import com.threerings.util.RandomUtil;
@@ -27,8 +27,10 @@ import com.threerings.util.RandomUtil;
import com.threerings.crowd.data.PlaceObject; import com.threerings.crowd.data.PlaceObject;
import com.threerings.parlor.Log; import com.threerings.parlor.Log;
import com.threerings.parlor.game.GameManager; import com.threerings.parlor.game.server.GameManager;
import com.threerings.parlor.game.GameManagerDelegate; import com.threerings.parlor.game.server.GameManagerDelegate;
import com.threerings.parlor.turn.data.TurnGameObject;
/** /**
* Performs the server-side turn-based game processing for a turn based * Performs the server-side turn-based game processing for a turn based
@@ -1,5 +1,5 @@
// //
// $Id: PlayerStatusView.java,v 1.4 2004/08/27 02:20:27 mdb Exp $ // $Id$
// //
// Narya library - tools for developing networked games // Narya library - tools for developing networked games
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved // Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
@@ -25,7 +25,7 @@ import javax.swing.JPanel;
import com.threerings.util.Name; import com.threerings.util.Name;
import com.threerings.parlor.game.GameObject; import com.threerings.parlor.game.data.GameObject;
import com.threerings.puzzle.data.BoardSummary; import com.threerings.puzzle.data.BoardSummary;
import com.threerings.puzzle.data.PuzzleConfig; import com.threerings.puzzle.data.PuzzleConfig;
@@ -48,7 +48,7 @@ import com.threerings.presents.dobj.ElementUpdatedEvent;
import com.threerings.crowd.client.PlaceControllerDelegate; import com.threerings.crowd.client.PlaceControllerDelegate;
import com.threerings.crowd.data.PlaceObject; import com.threerings.crowd.data.PlaceObject;
import com.threerings.parlor.game.GameController; import com.threerings.parlor.game.client.GameController;
import com.threerings.puzzle.Log; import com.threerings.puzzle.Log;
import com.threerings.puzzle.data.Board; import com.threerings.puzzle.data.Board;
@@ -1,5 +1,5 @@
// //
// $Id: PuzzleControllerDelegate.java,v 1.5 2004/10/15 23:33:51 mdb Exp $ // $Id$
// //
// Narya library - tools for developing networked games // Narya library - tools for developing networked games
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved // Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
@@ -23,7 +23,7 @@ package com.threerings.puzzle.client;
import com.threerings.crowd.data.PlaceObject; import com.threerings.crowd.data.PlaceObject;
import com.threerings.parlor.game.GameControllerDelegate; import com.threerings.parlor.game.client.GameControllerDelegate;
import com.threerings.puzzle.data.Board; import com.threerings.puzzle.data.Board;
import com.threerings.puzzle.data.PuzzleCodes; import com.threerings.puzzle.data.PuzzleCodes;
@@ -21,7 +21,7 @@
package com.threerings.puzzle.data; package com.threerings.puzzle.data;
import com.threerings.parlor.game.GameConfig; import com.threerings.parlor.game.data.GameConfig;
/** /**
* Encapsulates the basic configuration information for a puzzle game. * Encapsulates the basic configuration information for a puzzle game.
@@ -21,7 +21,7 @@
package com.threerings.puzzle.data; package com.threerings.puzzle.data;
import com.threerings.parlor.game.GameObject; import com.threerings.parlor.game.data.GameObject;
/** /**
* Extends the basic {@link GameObject} to add individual player * Extends the basic {@link GameObject} to add individual player
@@ -34,7 +34,7 @@ import com.threerings.presents.dobj.OidList;
import com.threerings.crowd.data.BodyObject; import com.threerings.crowd.data.BodyObject;
import com.threerings.crowd.server.CrowdServer; import com.threerings.crowd.server.CrowdServer;
import com.threerings.parlor.game.GameManager; import com.threerings.parlor.game.server.GameManager;
import com.threerings.util.MessageBundle; import com.threerings.util.MessageBundle;
import com.threerings.util.Name; import com.threerings.util.Name;
@@ -1,5 +1,5 @@
// //
// $Id: PuzzleManagerDelegate.java,v 1.4 2004/08/27 02:20:32 mdb Exp $ // $Id$
// //
// Narya library - tools for developing networked games // Narya library - tools for developing networked games
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved // Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
@@ -21,7 +21,7 @@
package com.threerings.puzzle.server; package com.threerings.puzzle.server;
import com.threerings.parlor.game.GameManagerDelegate; import com.threerings.parlor.game.server.GameManagerDelegate;
/** /**
* Extends the {@link GameManagerDelegate} mechanism with puzzle manager * Extends the {@link GameManagerDelegate} mechanism with puzzle manager
@@ -32,7 +32,8 @@ import com.threerings.crowd.util.CrowdContext;
import com.threerings.parlor.Log; import com.threerings.parlor.Log;
import com.threerings.parlor.client.*; import com.threerings.parlor.client.*;
import com.threerings.parlor.game.*; import com.threerings.parlor.game.client.*;
import com.threerings.parlor.game.data.*;
import com.threerings.parlor.util.ParlorContext; import com.threerings.parlor.util.ParlorContext;
public class TestClient extends com.threerings.crowd.client.TestClient public class TestClient extends com.threerings.crowd.client.TestClient
@@ -22,7 +22,7 @@
package com.threerings.parlor; package com.threerings.parlor;
import com.threerings.parlor.client.GameConfigurator; import com.threerings.parlor.client.GameConfigurator;
import com.threerings.parlor.game.GameConfig; import com.threerings.parlor.game.data.GameConfig;
public class TestConfig extends GameConfig public class TestConfig extends GameConfig
{ {
@@ -1,5 +1,5 @@
// //
// $Id: TestController.java,v 1.6 2004/08/27 02:21:02 mdb Exp $ // $Id$
// //
// Narya library - tools for developing networked games // Narya library - tools for developing networked games
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved // Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
@@ -22,7 +22,7 @@
package com.threerings.parlor; package com.threerings.parlor;
import com.threerings.crowd.client.PlaceView; import com.threerings.crowd.client.PlaceView;
import com.threerings.parlor.game.GameController; import com.threerings.parlor.game.client.GameController;
public class TestController extends GameController public class TestController extends GameController
{ {
@@ -1,5 +1,5 @@
// //
// $Id: TestManager.java,v 1.4 2004/08/27 02:21:02 mdb Exp $ // $Id$
// //
// Narya library - tools for developing networked games // Narya library - tools for developing networked games
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved // Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
@@ -21,7 +21,7 @@
package com.threerings.parlor; package com.threerings.parlor;
import com.threerings.parlor.game.GameManager; import com.threerings.parlor.game.server.GameManager;
public class TestManager extends GameManager public class TestManager extends GameManager
{ {