Commit Graph

314 Commits

Author SHA1 Message Date
Ray Greenwell b994d709d3 A possible fix for someone who is having problems with the card flipping:
http://forums.puzzlepirates.com/community/mvnforum/viewthread?thread=30539&firstunread=yes


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3815 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-01-20 01:25:05 +00:00
Ray Greenwell 96f017fc3e Added getCards() convenience method.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3813 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-01-19 21:50:53 +00:00
Ray Greenwell e2cfd1de80 Added getPartyGameType, similar to the method in PartyGameConfig.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3808 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-01-18 22:15:05 +00:00
Ray Greenwell d67825b213 Provide an easy way to add to toString() info.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3806 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-01-17 23:28:21 +00:00
Ray Greenwell 7f98cac7a8 - Revamped PartyGameConfig so that it can report which type of party game
it is (seated or free-for-all) or if it's not a party game after all
  (which the old interface supported and we may need in the future).
- Cleaned up the setting of table occupants to make the extension in yohoho
  cleaner.
- tables are now party-game aware and will do the right thing with
  the occupants list.
- simplified Table.equals() and added a corresponding hashCode(), because
  two objects that are equals() must give the same hashCode.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3804 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-01-13 01:52:36 +00:00
Mike Thomas bf45bb876e Added ability for card sprites to be flipped to reveal a different card's image (such as from the card-back to a front). This is done by gradually scaling horizontally to no width, then scaling back up with the new image.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3803 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-01-09 21:45:06 +00:00
Ray Greenwell 852620bea4 Regenerated marshallers with new response-tracking code.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3793 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-12-21 02:12:57 +00:00
Mike Thomas fac90ce23d Split out announcement of a player elimination to its own function so we can override it for games where normal announcement doesn't make sense.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3790 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-12-21 00:52:30 +00:00
Michael Bayne 5225eb2a43 Changed handleStateChange() to stateDidChange() to be more consistent with
gameDidStart(), etc. and with the new GameManager.stateDidChange().


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3789 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-12-20 21:01:36 +00:00
Michael Bayne c7d36f9705 Changed AWAITING_PLAYERS to PRE_GAME; factored some code into stateDidChange().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3787 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-12-20 01:45:02 +00:00
Mike Thomas 04c13820ef Added ability to override hand-sorting on the card panel.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3778 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-12-08 19:41:12 +00:00
Mike Thomas 15ea2134e3 New type of CardSprite using the micro-card images.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3773 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-12-03 00:37:30 +00:00
Michael Bayne 176329e1ed Various updates to allow a system where a user's visible name is not the same
as their authentication name (which we leave in BodyObject.username). This
turns out to be simpler than the system we adopted for Yohoho wherein we
replace the player's user object after they select a character, but converting
to this sort of system is way more work than would be worth it.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3758 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-11-10 23:18:58 +00:00
Ray Greenwell 263a36e23e Allow a TableConfig to be set prior to initialization.
The configurator will use that as its prototype, and attempt to configure
the UI elements to display the values in that config.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3755 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-11-10 01:19:37 +00:00
Ray Greenwell 18833d7eb7 Added an isPrivate variable to GameObject.
Set it if a table game is created as being private.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3738 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-10-20 07:17:02 +00:00
Michael Bayne dd2468b140 Javadoc tidying up.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3725 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-10-08 22:21:19 +00:00
Michael Bayne f32b2de490 Enumerated legacy services which have class-based providers and regenerated
those that do not using the template.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3716 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-09-27 23:09:45 +00:00
Andrzej Kapolka 4fbb911d7c Use a sublist view rather than removing and adding cards one by one.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3713 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-09-27 21:58:10 +00:00
Ray Greenwell 277af53513 We shouldn't be using OidLists to report winners/losers/players knocked out.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3711 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-09-27 01:50:29 +00:00
Ray Greenwell ede0d9f471 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
2005-09-23 02:00:52 +00:00
Michael Bayne 88e72fbbf6 Call endPlayerGame() before we finish the bodyLeft() processing because if the
leaving player was the last human player in the room, bodyLeft() will result in
a call to placeBecameEmpty() which will shut the game manager down before it
has a chance to end the game cleanly as a result of said player leaving.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3708 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-09-22 19:52:58 +00:00
Michael Bayne f79a52142c Nomenclature fix: puzzle -> game.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3701 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-09-09 00:42:34 +00:00
Michael Bayne 738cf657cb Allow a player to be replaced in an in-play game; properly handle the case
in a turn-based game where the turn holder is replaced and update the
turnHolder field in a way that doesn't cause the client to think that the
turn changed.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3667 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-08-03 07:46:54 +00:00
Michael Bayne 595df9ee28 Which game you talkin' 'bout Willis?
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3641 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-07-05 17:39:48 +00:00
Ray Greenwell b603e6b051 More stuff with ending player games:
- If a player leaves, handle the ending of their game in GameManager.
- don't start the turn first turn in turn-based games on a missing player
- Let derived classes get playerGameDidEnd() even if the game doesn't
  have statuses.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3640 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-07-01 23:56:54 +00:00
Elizabeth Fong e1338dca1e partial fix to 'logged off players automatically win all matches in tourneys'
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3639 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-07-01 00:50:13 +00:00
Ray Greenwell 80ac008f24 Prevent array index bounds problems if isOccupiedPlayer gets called
with -1 (I saw it happen entering a sword game as a watcher).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3613 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-06-22 19:59:51 +00:00
Ray Greenwell 681561c4bf Removed backwards compatability with things that don't understand
that we're using a grid bag layout and they should use addControl().
Toybox is updated, and if there's anything else out there it's going
to need to be updated anyway, because it likely extends GameConfigurator
directly which is no longer a component.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3611 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-06-22 18:43:43 +00:00
Ray Greenwell 42aaf9d64d Moved team game configuration stuff into the TableConfig, added
a method in Table to return the compressed team indices, added
a new TeamGameManager which can be implemented to have the final
team info communicated to the game manager.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3604 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-06-17 20:25:28 +00:00
Ray Greenwell 6ce0059b29 Removed special "party" crap related to starting a game after it's
been created. A party game starts itself without direct user intervention.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3600 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-06-15 23:46:31 +00:00
Ray Greenwell 97b1085388 Added support for minimumPlayerCount, allowing tables to be started
before they're full.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3597 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-06-13 23:47:48 +00:00
Ray Greenwell 8bec395301 Updated documentation.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3596 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-06-13 18:52:33 +00:00
Ray Greenwell cf5b889be6 The continuing refactor.
- GameConfigurators are no longer JPanels, but rather abstract classes
  that show UI in their own way. There is a SwingGameConfigurator that
  has a panel.
- TableConfigurator is no longer an interface, but is now more closely
  like the GameConfigurator.
- Repackaged some things that were in the wrong place.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3593 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-06-10 18:10:49 +00:00
Ray Greenwell b209ee036d Beginnings of a new unified way of configuring not only puzzles but
associated options depending on the context of the puzzle, for example
the wager, or tournament options. Kept the default layout as a vgroup
for backwards compatability (although I think the only thing that needs
that is the ToyBoxConfigurator, and I've been wanting to make that bad
boy line up nicely for a while now, so this backwards compatible stuff
will only be needed for a short while).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3590 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-06-08 23:20:18 +00:00
Ray Greenwell a5844db478 Rather that returning a String[] description, return a List.
Subclasses can now easily add their own descriptions on to the beginning
or end of their superclass's descriptions without having to do the
hokey pokey.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3570 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-05-23 23:17:24 +00:00
Andrzej Kapolka a40de2ec51 Permit changing media render order as long as we're not in a tick. Removes the need to remove and re-add sprites, which was cancelling their paths.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3551 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-05-13 22:22:56 +00:00
Ted V c5024298fc Fixme was fixed implicitly a while back; just cleaning up comments.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3547 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-05-12 18:51:57 +00:00
Ted V 64de3f4368 Player status is now initialized for all games. (And yes, I tested
that initBoard didn't generate some exceptions now that the player
status initialization occurs after board summary initialization.  This
occurs in sword fighting and old drinking, for the record.)


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3546 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-05-12 00:51:11 +00:00
Andrzej Kapolka 77a9438c69 Check the size of the hand to make sure the request isn't for an earlier trick.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3545 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-05-07 01:17:49 +00:00
Andrzej Kapolka ff38ec6673 Don't generate InvocationExceptions that don't go to the client; silently ignore requests made after timeouts, generate warnings for other invalid requests.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3543 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-05-06 22:42:32 +00:00
Andrzej Kapolka f8f6c210d6 Changed static constants.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3538 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-05-03 18:20:57 +00:00
Andrzej Kapolka 43a903c31c Eliminated the hacky "play card" selection mode, since it's no longer necessary.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3537 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-05-03 18:18:40 +00:00
Andrzej Kapolka 0793baaf22 Slight changes to cope with lag and unresponsiveness.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3535 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-05-03 01:49:10 +00:00
Ray Greenwell bc07aa1afd Use a dobj transaction to bundle up the events that get dispatched during
each card play. More could be done, I just added this quickly.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3530 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-04-30 21:37:59 +00:00
Ray Greenwell f5e5d273e7 Moved ScoreAnimation to parlor/media so that games may make use of it.
Removed "puzzle fonts" from the narya library (lived in PuzzleBoardView).
Left convenience methods in PuzzleBoardView for creation ScoreAnimations,
as we like convenience.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3527 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-04-28 23:17:29 +00:00
Andrzej Kapolka 73a48a11e9 To avoid having cards bounce up and down when you hold the mouse cursor near the bottom of the hand, don't update the active sprite every frame; rather, only update it at certain key times.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3526 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-04-27 20:36:48 +00:00
Ray Greenwell 052cf8e0e2 Table creation refactor: Rather than have the game config specify
table configuration parameters that are unneeded once the actual game starts,
and requiring each GameConfigurator to duplicate the functionality
of standard table setup, I separated TableConfig from GameConfig.
If a game wants to be usable in a table matchmaking service, it
implements TableableGameConfig, and returns the TableConfigurator to use.
There is a default TableConfigurator implementation that just does
everything needed. TableConfigurator returns a happily customized
TableConfig, which is sent to the server with the GameConfig in order to
create the Table.
More refactoring needs to happen to get the Party stuff in line, but
right now that's all a mess since we're still supporting the old-style
party interface for the old drinking puzzle in yohoho.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3525 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-04-26 02:38:42 +00:00
Andrzej Kapolka b35468910a Added option to disable selection mode without updating offsets (to avoid playing a card more than once) and switched to checking the mouse location every frame in order to activate cards that moved themselves under the mouse cursor.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3522 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-04-22 21:54:21 +00:00
Andrzej Kapolka d065bfde1c Return null for unoccupied positions in the player oid array.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3520 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-04-22 18:35:05 +00:00
Andrzej Kapolka fc9603fc86 Removed extra duration increase.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3518 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-04-21 01:33:17 +00:00