Commit Graph

66 Commits

Author SHA1 Message Date
Michael Bayne b486315e47 Revamp! Modified the way configuration is handled.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1166 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-03-28 22:32:34 +00:00
Michael Bayne 1806eb3344 Added equals() and hashCode() so that we can compare game configurations;
removed serialization code because SimpleStreamableObject now
automatically handles it.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1153 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-03-26 22:58:31 +00:00
Michael Bayne 7ccb9594b9 Changed DSet.Element to DSet.Entry in preparation for the addition of
array element update support. (Arrays have elements, sets have entries.)


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1133 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-03-18 23:21:26 +00:00
Michael Bayne 5f18acd3d8 Modified distributed object attribute setting such that attributes are
*always* set immediately because after some deliberation, we decided that
doing that led to less unexpectedly annoying behavior than having to wait
for the event to propagate to see the new value.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1062 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-20 23:35:42 +00:00
Walter Korman c0cfec8f90 Fixed comment typo.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1060 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-20 02:10:02 +00:00
Michael Bayne b3619774c3 Use setStateImmediate() when ending the game so that other game manager
code doesn't have to do something like that itself to prevent code from
being inadvertently executed after the game has been ended.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1002 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-15 03:42:32 +00:00
Michael Bayne 573939b483 Ignore request to start up an in-play game; moved code that starts a game
when all players have arrived in the game room into a method that can be
overridden.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1000 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-14 07:28:12 +00:00
Michael Bayne 6448309b0e startGame() and endGame() need to be public to be accessible to the
delegates; added isGameOver() to standardize the way that the delegates
determine that the game is over (isGameOver() may need to be customized by
the games, so we want the delegates to use the game's custom code when
appropriate).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@996 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-13 18:50:15 +00:00
Michael Bayne a85a6f1394 Delegation! Since it's clear that extracting services into delegation
classes is only going to become more common, I've gone and created a
comprehensive facility for creating and using delegates in the place
controller and manager as well as the game controller and manager. With
the pattern nicely set, it is also easy to extend to controller/managers
further up the hierarchy that might need to delegate special methods of
their own. Whee!


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@994 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-13 03:21:28 +00:00
Michael Bayne ebc3fe229d Made getTurnHolderIndex() public.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@991 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-12 07:17:33 +00:00
Michael Bayne 671d7ddce1 Documentation fixes.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@990 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-12 07:01:54 +00:00
Michael Bayne 7a8908111b Oh the humanity. Modified the turn game services to be a "mix-in" using
the bastard Java technique of delegates and interfaces. I feel like I'm
doing OOP with one hand tied behind my back.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@989 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-12 06:57:30 +00:00
Michael Bayne fca91d350b Added facilities for being notified when the parlor director receives a
game ready notification and for taking charge of the process of entering
the game room.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@980 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-09 11:23:49 +00:00
Michael Bayne 5581b3e65b Converted more dobj classes to use the gendobj script. (Had to do a wee
bit of fiddling to accomplish some things that used to be done by hand.)


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@973 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-08 23:55:25 +00:00
Michael Bayne a83e512270 Modified DObject.toString() to use fieldsToString() so that all of its
derived classes need not do their own toString()ing.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@928 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-04 01:47:20 +00:00
Michael Bayne b7913ceb0b Moved generic marshalling code into presents.io from presents.dobj.io as
it is now general purpose.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@912 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-01 23:32:37 +00:00
Michael Bayne 6e962013a9 Minor cleanups; added PlaceManager to MessageHandler callback.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@773 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-12-14 00:11:18 +00:00
Michael Bayne f4f846f7e8 Don't log the whole game object when we destroy it, just the oid.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@595 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-11-07 10:44:02 +00:00
Michael Bayne ebdb840264 Modified gameDidStart() and gameDidEnd() to take place after the game
state transition event has been processed. This ensures that any events
posted up to (and during) the call to startGame() or endGame() are
dispatched before we invoke code that reacts to that change in game state.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@593 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-11-07 03:21:42 +00:00
Michael Bayne b632510cb1 Javadoc edits.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@576 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-26 01:40:22 +00:00
Michael Bayne afdba54f1c Remove the body to table mapping when a user leaves the table.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@565 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-25 23:02:17 +00:00
Michael Bayne 6cc3631d48 Rearrangements and added code to clean up after tables when their
associated games finally go away.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@548 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-24 01:14:38 +00:00
Michael Bayne 30185cb814 Shut down the game manager when everyone leaves the room. The game object
and manager will simply disappear at that point which means that the game
will be aborted if it hasn't yet been completed.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@547 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-24 01:00:54 +00:00
Michael Bayne 218eea6dc2 Changed TableManager to TableDirector. Will I ever learn?
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@534 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-23 23:52:01 +00:00
Michael Bayne a4ceafd268 Extracted server side of table management from the parlor manager and put
it into its own table manager class so that each place manager that wishes
to perform table management can instantiate a table manager which can then
more easily track tables for that particular place.

Now handle occupants disappearing from pending tables properly. Still need
to sort out game object life-cycle tracking.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@532 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-23 23:47:02 +00:00
Michael Bayne 095cbfb970 Stub implementation of handleLeaveFailed().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@531 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-23 20:26:30 +00:00
Michael Bayne 246987893d More progress on table services (can leave a table, things start correctly
now, and much much more).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@529 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-23 20:23:29 +00:00
Michael Bayne 1214056eba More table services! Yay!
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@527 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-23 02:22:17 +00:00
Michael Bayne 395c8a2a19 Added stubs for invocation service callbacks.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@521 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-22 23:56:25 +00:00
Michael Bayne dc0df5bdf8 Javadoc updates.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@520 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-22 23:56:01 +00:00
Michael Bayne 9b89a3f994 Back-end facilities for table matchmaking.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@508 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-19 22:02:36 +00:00
Michael Bayne cc5473745e Modified startTurn() to get the player name from the _players array rather
than looking up their body object (because we don't *really* need them to
be online to start their turn).

Also added a sanity check to startTurn() to ensure that someone didn't
booch the _turnIdx before calling it.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@506 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-19 21:07:06 +00:00
Michael Bayne 8c1d9e9a3d Beginnings of table matchmaking services.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@503 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-19 02:04:29 +00:00
Michael Bayne 35a0671430 Added isOurTurn() for derived classes to call to determine correctly
whether or not it is their turn.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@498 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-18 20:53:23 +00:00
Michael Bayne 01737e6486 Only start the game once when we receive all of our player ready
notifications. If someone disconnects and comes back, we don't want to
restart the game when they show up and we determine that everyone is once
again available.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@489 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-18 18:39:10 +00:00
Michael Bayne 47d9b36675 Don't choke if a player is not around to receive their game ready
notification.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@488 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-18 02:19:54 +00:00
Michael Bayne a140c24a53 Added getTurnHolderIndex().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@483 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-17 23:29:42 +00:00
Michael Bayne 1e4d93205d Added toString().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@469 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-17 02:49:37 +00:00
Michael Bayne cc27d0fb60 Log a strack trace if we choke while trying to create a game manager.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@468 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-17 02:49:17 +00:00
Michael Bayne 9e6c104015 Stick the players array in the game object; also implemented toString().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@467 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-17 02:48:57 +00:00
Michael Bayne 654a0a316a More turn management code and callbacks.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@455 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-12 19:31:35 +00:00
Michael Bayne 60c829d921 Removed the PlaceObject argument from MessageHandler.handleEvent. You
already have that around in 99% of the cases that you're implementing
message handlers and you more likely have it casted to the type you're
interested in and don't get any use out of that extra argument and have to
import PlaceObject when you might not otherwise have had to.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@453 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-12 19:30:44 +00:00
Michael Bayne cb296d1467 Skeleton of turn-based game services.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@444 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-12 00:30:10 +00:00
Michael Bayne 804505890f We love to revamp! Created a set of listener interfaces which are used
with distributed objects rather than having a single handleEvent() by
which all subscribers are forced to hear about all events. Now one
subscribes separately and then adds onesself as any of a few types of
listener once they have access to the subscribed object reference.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@439 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-12 00:03:03 +00:00
Michael Bayne 6634eb3fc9 Moved Parlor game stuff into parlor.game package instead of spreading it
across parlor.client, parlor.server and parlor.data.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@437 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-11 21:08:22 +00:00
Michael Bayne 8a4c46badc The first great Three Rings renaming. Cocktail changed to Narya, Cher
changed to Presents and Party changed to Crowd. Whee!


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@431 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-11 04:07:54 +00:00
Michael Bayne ac477756ea Added code to handle sending player ready notifications and to process
them on the server (and start the game).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@430 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-11 03:12:38 +00:00
Michael Bayne 05d2d84353 For now, just head directly to the game room when we are notified that our
game is ready.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@424 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-09 20:20:52 +00:00
Michael Bayne c69b6a2a32 Log something when we create a game manager.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@423 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-09 20:20:35 +00:00
Michael Bayne 2653f9a416 Doc update.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@414 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-09 18:18:07 +00:00