Commit Graph

187 Commits

Author SHA1 Message Date
Bruno Garcia 7d75f0c760 - Ban booted players from a table
- Boot by sitting position, not oid


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@713 c613c5cb-e716-0410-b11b-feb51c14d237
2008-08-06 22:52:41 +00:00
Bruno Garcia 72935d719c Adding booting TableDirector
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@711 c613c5cb-e716-0410-b11b-feb51c14d237
2008-08-06 00:57:00 +00:00
Michael Bayne 8410b8893c Actually these had been generated. Bruno must have regenerated them with an old
version of Narya.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@710 c613c5cb-e716-0410-b11b-feb51c14d237
2008-08-06 00:53:22 +00:00
Bruno Garcia 9a822fe561 - Adding support for booting players from a table
- Apparently genservice hasn't been run in a while, so half of vilya just got poked


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@709 c613c5cb-e716-0410-b11b-feb51c14d237
2008-08-06 00:41:46 +00:00
Michael Bayne bb0d6c5ba4 More code hygiene. Need to do some fiddling to make dispatchers not generate
generics warnings when calling methods with generic types.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@698 c613c5cb-e716-0410-b11b-feb51c14d237
2008-08-01 14:40:54 +00:00
Michael Bayne 7708bc96a6 Type that DSet.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@697 c613c5cb-e716-0410-b11b-feb51c14d237
2008-08-01 11:22:40 +00:00
Par Winzell 117d9cb03f Move PlayManager*.java from crowd.server to parlor.server.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@696 c613c5cb-e716-0410-b11b-feb51c14d237
2008-07-31 17:28:18 +00:00
Par Winzell f3dff81492 Do the right thing, not the wrong thing. It's late...
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@694 c613c5cb-e716-0410-b11b-feb51c14d237
2008-07-31 06:20:32 +00:00
Par Winzell 23311ca4f7 Oops, the contract is to return playerId's occupant. I dunno, I have some doubts about all this...
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@693 c613c5cb-e716-0410-b11b-feb51c14d237
2008-07-31 06:15:27 +00:00
Par Winzell a3232d645e Basic implementation of the PlayManager interface.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@692 c613c5cb-e716-0410-b11b-feb51c14d237
2008-07-31 05:49:33 +00:00
Michael Bayne aae3a0152a Let the type system know that we know that we don't know what kind of
comparable we're dealing with.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@691 c613c5cb-e716-0410-b11b-feb51c14d237
2008-07-30 14:00:23 +00:00
Michael Bayne 18608763ea Regenerated services and objects.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@690 c613c5cb-e716-0410-b11b-feb51c14d237
2008-07-30 13:56:07 +00:00
Dave Hoover bcbe163a12 Prune unneeded imports, nuke some unneeded casts, rerun code generators.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@687 c613c5cb-e716-0410-b11b-feb51c14d237
2008-07-28 17:27:38 +00:00
Michael Bayne eb935ecfab Nixed unused variable references.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@686 c613c5cb-e716-0410-b11b-feb51c14d237
2008-07-26 22:04:34 +00:00
Michael Bayne edaa96aef3 RatingManagerDelegate -> RatingDelegate (we're not a delegate of a
RatingManager, we're a GameManagerDelegate that handles ratings); inject our
dependencies.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@672 c613c5cb-e716-0410-b11b-feb51c14d237
2008-07-23 12:35:49 +00:00
Dave Hoover 624daadcd9 Nix unneeded imports, add @Overrides, remove content-free comments, and rerun code generators.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@670 c613c5cb-e716-0410-b11b-feb51c14d237
2008-07-18 19:02:08 +00:00
Dave Hoover d00c21ae1a Rerun generators.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@656 c613c5cb-e716-0410-b11b-feb51c14d237
2008-07-10 18:39:53 +00:00
Michael Bayne 7b945dd674 Type our delegate ops instead of restricting our delegates.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@655 c613c5cb-e716-0410-b11b-feb51c14d237
2008-07-10 13:37:10 +00:00
Michael Bayne 17ffca41e7 Enforce the use of Game{Controller|Manager}Delegates where needed.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@654 c613c5cb-e716-0410-b11b-feb51c14d237
2008-07-10 13:19:52 +00:00
Dave Hoover 0615b7b2f1 No really, I'm pretty sure we want the AIs to tick more than once per game.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@651 c613c5cb-e716-0410-b11b-feb51c14d237
2008-07-02 00:09:42 +00:00
Charlie Groves fc2dd9a591 If the config coming in to the configurator is causing the interface to hork, try with an empty one in the hopes that the brokenness can be solved with a fresh start.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@647 c613c5cb-e716-0410-b11b-feb51c14d237
2008-07-01 02:13:30 +00:00
Michael Bayne 40ffa60f50 Inject depends into Tournies and ToureyManager.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@646 c613c5cb-e716-0410-b11b-feb51c14d237
2008-06-30 13:30:17 +00:00
Michael Bayne c3162107cf Make it easy for derived classes to start and stop the AI ticker if they need
to outside the normal circumstances.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@645 c613c5cb-e716-0410-b11b-feb51c14d237
2008-06-29 15:30:10 +00:00
Michael Bayne 037be2d16c Removed implicit depends; nixed grouping of AI and game manager ticks into a
single interval as that caused problems (which Charlie had to work around) and
added unnecessary complexity and indirection. There are not so many games and
so many tickers that we need to second guess the efficiency of Interval.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@644 c613c5cb-e716-0410-b11b-feb51c14d237
2008-06-29 14:25:55 +00:00
Michael Bayne 026a6bb128 Take our depends explicitly.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@643 c613c5cb-e716-0410-b11b-feb51c14d237
2008-06-29 14:20:17 +00:00
Michael Bayne d2841a3976 Clean up service registry.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@638 c613c5cb-e716-0410-b11b-feb51c14d237
2008-06-29 14:15:26 +00:00
Michael Bayne 442847c292 Inject depends, use the locator to find bodies.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@637 c613c5cb-e716-0410-b11b-feb51c14d237
2008-06-29 14:15:07 +00:00
Michael Bayne 4e3f973f2d Let's put those in a more sensible order.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@632 c613c5cb-e716-0410-b11b-feb51c14d237
2008-06-29 12:58:54 +00:00
Michael Bayne 9b3b3c0e5a Remove implicit omgr, invmgr and plreg dependencies.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@631 c613c5cb-e716-0410-b11b-feb51c14d237
2008-06-29 12:57:20 +00:00
Michael Bayne 625cf7fa75 Eliminate implicit invoker dependency. Some Lists, Maps, etc.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@630 c613c5cb-e716-0410-b11b-feb51c14d237
2008-06-29 12:54:50 +00:00
Michael Bayne 8cd2bf8efd Regened services.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@628 c613c5cb-e716-0410-b11b-feb51c14d237
2008-06-29 12:46:26 +00:00
Charlie Groves 5cc2e4b3f3 Remove games from the ticker if their AI goes rogue so one game blowing up doesn't cause all games to stop ticking
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@627 c613c5cb-e716-0410-b11b-feb51c14d237
2008-06-16 06:21:52 +00:00
Michael Bayne 36c2cc8289 Updated ClientFactory implementations. Use new PlaceManagerDelegate members.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@619 c613c5cb-e716-0410-b11b-feb51c14d237
2008-06-08 20:24:30 +00:00
Michael Bayne cf857dedaa Allow the RatingRepository to be injected.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@616 c613c5cb-e716-0410-b11b-feb51c14d237
2008-06-08 15:13:28 +00:00
Michael Bayne 0a2b8b8f52 Basic Guice compliance.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@614 c613c5cb-e716-0410-b11b-feb51c14d237
2008-06-07 17:45:30 +00:00
Michael Bayne 2090bcdfeb Regenerated invocation service bits.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@613 c613c5cb-e716-0410-b11b-feb51c14d237
2008-06-06 14:39:03 +00:00
Michael Bayne 2890c16224 Back in the wild and wooly days of Puzzle Pirates development, we determined
that we needed to be able to tell if one game ended and another one had started
so we introduced GameObject.roundId which was a value that was incremented
every time the game started. Thus if you had a timer that expired and you
wanted to make sure that somehow the game hadn't ended and then been started
anew while you were away, you could save the roundId and check it when you woke
up. That was all fine and good, except for the poor choice of variable name.

Then we came to implement Whirled and wanted to provide an abstraction of
"rounds" which were subunits into which a single game is divided. We had this
lovely variable already lying around called roundId and we succumbed to the
temptation to overload its meaning and have games that use round increment the
round id multiple times during a game which preserves the monotonically
increasing nature of roundId as expected by the Parlor code and seemed to do no
harm.

Then we discovered a pesky wrinkle, which is that GameManager sets
GameObject.roundId in gameWillStart() and then goes on to set GameObject.state
after that. We were naturally listening for roundId to change and triggering a
call to roundDidStart() at that time, but this resulted in a strange sequencing
of callback methods that went: roundDidStart(), gameDidStart(), roundDidEnd(),
roundDidStart(), ..., roundDidEnd(), gameDidEnd().

The premature roundDidStart() was irksome, and I looked into what would be
needed to remedy it. It turned out that a lot of code on the server-side of
things depended on the Parlor semantics of roundId and wanted roundId to be set
to the current round's value in gameWillStart() and similarly in
gameDidStart().  However, there's no gameWillStart() on the client and it
didn't appear to me that anyone much cared about roundId in gameDidStart(), so
I opted for some hackery in the name of expedience that preserved the
server-side semantics but changed the client to see ROUND_ID change after STATE
changed.

As you might expect given the verbosity of this explanation, that turned out to
be a new bad idea stacked on the previous bad idea of reusing roundId which was
stacked on the bad choice of name for roundId. It turns out some puzzles in
Yohoho did expect roundId to be already set in gameDidStart() which was no
longer the case and the inevitable digital mayhem ensued.

The time has come to undo the various bad decisions and replace them with new
decisions that we hope aren't bad. Those decisions are:

- rename roundId in GameObject to sessionId and restore its original semantics
  which are that it represents a monotonically increasing integer that is
  incremented (and published to the client) in gameWillStart() and thus
  represents the current game session from the very first to the very last;

- add WhirledGameObject.roundId for handling rounds in Whirled games and give
  it the semantics we desire which are for it to be set to 1 in gameDidStart()
  and then incremented only when a new round is started, and reset to 1 when a
  new game is started (this change is in another commit).

This will temporarily break some builds as I need to go rename some things in
Yohoho and then I need to look at Bang! Howdy which if I recall correctly also
naughtily uses roundId for nefarious ulterior purposes and needs also to be
cured of its wayward habits.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@611 c613c5cb-e716-0410-b11b-feb51c14d237
2008-06-06 14:20:36 +00:00
Michael Bayne a133c7c693 Switch to new logging API.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@608 c613c5cb-e716-0410-b11b-feb51c14d237
2008-05-27 20:00:28 +00:00
Michael Bayne ae6c542271 Nixement of ze redundant casts.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@601 c613c5cb-e716-0410-b11b-feb51c14d237
2008-05-22 12:08:27 +00:00
Michael Bayne eb6ad10295 Let the unit report failure.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@598 c613c5cb-e716-0410-b11b-feb51c14d237
2008-05-18 11:19:33 +00:00
Charlie Groves 19af9eb71a Indicate that isActivePlayer is a better way to see if a player is in the game than accessing playerStatus directly
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@597 c613c5cb-e716-0410-b11b-feb51c14d237
2008-05-16 21:08:26 +00:00
Ray Greenwell ef217c4ea5 playerInRoom -> occupantInRoom.
For games that make use of this, all occupants should call it,
unless they call playerReady().


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@590 c613c5cb-e716-0410-b11b-feb51c14d237
2008-05-02 01:50:10 +00:00
Michael Bayne f044381e2c Clarify the logic in this method to make it clear that there's no way out that
does not result in shutdown() being called.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@589 c613c5cb-e716-0410-b11b-feb51c14d237
2008-04-29 19:00:33 +00:00
Michael Bayne c8f680696d It's a party in here. We have a method that handles checking whether to start
up a shutdown interval. Let's override that method and implement GameManager's
special requirements instead of overriding an unrelated method and duplicating
most of the code from it.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@588 c613c5cb-e716-0410-b11b-feb51c14d237
2008-04-29 18:57:15 +00:00
Ray Greenwell 759050d576 3 things: Sanity, clarity, correctness.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@587 c613c5cb-e716-0410-b11b-feb51c14d237
2008-04-29 18:33:46 +00:00
Charlie Groves e3cf4a762d Knock the idleUnloadPeriod down to 0 since GameManagers don't go idle and having a shutdown interval just keeps them resident in memory
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@586 c613c5cb-e716-0410-b11b-feb51c14d237
2008-04-29 17:55:03 +00:00
Michael Bayne 4ca129e527 Do some fiddly business to update our roundId locally in gameWillStart so that
all pre-game processing can properly know what round it is, but then actually
publish that value to the clients so that we can trigger off ROUND_ID to call
roundDidStart without having roundDidStart get called before gameDidStart.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@583 c613c5cb-e716-0410-b11b-feb51c14d237
2008-04-22 01:02:05 +00:00
Michael Bayne 29460ce450 Don't let a player create a new table or join an existing table if they're
already sitting at a table. We also enforce this in the UI (though not in
certain cases in MSOY at the moment which is how this was uncovered).


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@577 c613c5cb-e716-0410-b11b-feb51c14d237
2008-03-24 23:00:09 +00:00
Michael Bayne c0ce0d188b Allow the no-show timer to be customized.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@576 c613c5cb-e716-0410-b11b-feb51c14d237
2008-03-21 18:17:03 +00:00
Mark Johnson ee6889395f This is throwing a wrench in bang, reverting it now and will take a better look at it later
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@571 c613c5cb-e716-0410-b11b-feb51c14d237
2008-03-13 20:21:48 +00:00