Commit Graph

268 Commits

Author SHA1 Message Date
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
Andrzej Kapolka 93a58a719f Increase turn durations when players manage not to time out.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3517 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-04-21 01:31:08 +00:00
Andrzej Kapolka 5b360afd52 Decrease turn durations after players time out.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3516 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-04-21 00:47:17 +00:00
Ray Greenwell d75c0e83e6 Don't NPE if the turn holder is null somehow.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3508 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-04-20 03:18:48 +00:00
Andrzej Kapolka 2421eeb696 Moved cleanup code to gameDidEnd.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3507 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-04-20 01:53:49 +00:00
Andrzej Kapolka 87c169e6ac Added extra methods to support AIs.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3506 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-04-20 00:27:34 +00:00
Andrzej Kapolka ad5be61e28 Use isMoving.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3504 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-04-19 18:29:14 +00:00
Andrzej Kapolka 1ce83b126d Wrong operator.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3503 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-04-19 18:26:56 +00:00
Andrzej Kapolka ed670dd4ba Card manipulation tweaks. Don't update the positions of moving cards.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3502 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-04-19 18:23:59 +00:00
Andrzej Kapolka 024bc8afe1 Added method to handle multiple simultaneous transfers to ensure that cards are always subtracted from the hand before more cards are added.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3501 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-04-18 22:02:14 +00:00
Andrzej Kapolka 8bb219bfed Moving cards are not selectable; update card offsets when they reach the ends of their paths.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3500 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-04-18 21:02:20 +00:00
Ray Greenwell 3b947af265 Parenthesis population.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3498 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-04-16 05:26:16 +00:00
Andrzej Kapolka d93c26f158 Fixed NPE in TrickCardGameManagerDelegate, changed comment.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3497 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-04-16 03:41:08 +00:00
Andrzej Kapolka 4266c72977 Changed TrickCardGameUtil to use more sensible round-the-table ordering. Changed TeamGameConfig to return the actual indices of the team members, so that teammates need not have consecutive indices.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3496 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-04-16 02:00:57 +00:00
Andrzej Kapolka 6d0648b0b7 Added a pause step before the drop into the hand.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3494 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-04-15 21:09:45 +00:00
Andrzej Kapolka dcf9c2c9e8 Don't lower card down all the way if it's still selectable.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3493 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-04-15 03:10:06 +00:00
Michael Bayne 12d1d00e4b We need to be able to veto the rematch.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3492 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-04-15 02:50:49 +00:00
Michael Bayne b221524071 Formalize the notion of rematching a game so that derived classes can get
involved in the process.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3491 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-04-15 02:45:20 +00:00
Andrzej Kapolka 35bef9647c Added support for an additional drop step to better show cards received from other players.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3490 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-04-14 23:39:41 +00:00
Ray Greenwell d6d23b5e2d Yes, it's sufficient, and now it's done too.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3489 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-04-14 23:20:30 +00:00
Ray Greenwell d5bf33102a Checking the active player should automatically discount unoccupied seats.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3488 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-04-14 23:05:16 +00:00
Andrzej Kapolka 96133e45e9 Keep track of active card sprite, making sure it keeps being shown as selectable between selection mode switches.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3487 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-04-14 22:54:28 +00:00
Michael Bayne eda477180f Allow additional game states.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3485 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-04-14 01:22:38 +00:00
Andrzej Kapolka ffbf3f7082 Added another utility method.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3484 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-04-13 22:57:43 +00:00
Michael Bayne 69cd0b41a7 Provide a default green background for games that don't provide an image.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3483 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-04-13 21:41:35 +00:00
Michael Bayne 0cd9b75c09 Don't send hands to AI players.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3482 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-04-13 21:39:15 +00:00
Andrzej Kapolka 86959a5191 Added updateBounds method to LabelSprite to allow changing the label, added methods to TrickCardGameUtil to get players left/right/opposite, changed the way CardPanel handles selections.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3481 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-04-13 21:09:32 +00:00
Andrzej Kapolka e5442732aa Made a change to prevent cards sticking up after hand readjustment.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3476 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-04-13 02:45:32 +00:00
Andrzej Kapolka 743ff2bbbc Clear out played card fields when they shouldn't be displayed.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3475 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-04-13 01:42:18 +00:00
Andrzej Kapolka d2b4be178a Moved rematch handling up the hierarchy, made Card constructor public in order to create specific cards for searching, etc.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3474 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-04-13 01:15:43 +00:00
Andrzej Kapolka 966703a56a Fixed bug in raising only selectable card.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3466 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-04-12 03:43:56 +00:00
Andrzej Kapolka 7fd9b51cab First checkin for the great Spades refactor.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3465 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-04-12 02:50:17 +00:00
Ted V 4e07b63ce1 Added "is it my turn?" style function.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3463 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-04-11 23:50:29 +00:00
Ray Greenwell cead8612c7 Invalid table positions may also be too low.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3458 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-04-04 20:32:20 +00:00
Ray Greenwell 280df17e35 Made the clearOccupant methods maximally overrideable.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3457 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-04-04 20:07:24 +00:00
Michael Bayne 0bf43bc2e8 Step two in the great Stage refactor. I don't know how many steps will be
needed all told, but I like to see the number keep going up.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3438 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-29 23:18:59 +00:00
Michael Bayne f2a9f7ed0d Further AI handling improvements.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3401 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-12 10:08:02 +00:00
Michael Bayne 787d4f1fe5 Allow AI configuration to be specified in the GameConfig and automatically
put into place before the game starts.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3400 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-12 07:46:34 +00:00
Michael Bayne fb53600e92 Revamped the way AI configuration is specified to be more extensible.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3399 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-12 07:37:34 +00:00
Ray Greenwell b4e595bd3c Prevent infinite loops if there is no qualified player to become the
new turn holder. Log a warning. This is how we do things here.

Additionally, something I didn't change that is redundant is checking
to see if the player name is null, when the default implementation of
the active player check will return false if the name is null. It seems
to me that the movement of the active player business into the base game
package can result in some cleanup that hasn't been done, but I don't
want to look into it any further.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3398 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-11 22:14:23 +00:00
Ray Greenwell 3549b9cdaf Do not require the playerStatus field to be initialized. If someone wants
to write a simple board game for gamegardens, they shouldn't have to
explicitly set up an array indicating that all the players are active
(or worse, waste 45 minutes tracking down why the game is freezing up
suddenly).

If the playerStatus array is null, all players are active.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3397 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-11 22:10:27 +00:00
Ted V 51e8ef3687 Yeah, it does need the !.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3391 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-10 00:16:13 +00:00
Ted V 08cc800694 Turn/GameManager now supports interface for checking whether a player
is still actively playing the game.  The delegate now uses this when
incrementing turns to skip over players not a part of the game (rather
than needing this same code in the derived classes).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3390 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-10 00:13:25 +00:00
Ted V 94bf03ec9d Moved player status tracking and in/out of game status from puzzles to
games.  Updated the PLAYER_KNOCKED_OUT variable name to prevent some
namespace contention issues.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3386 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-09 22:52:03 +00:00
Michael Bayne 924363a8a6 Further refactoring into client, data and server.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3382 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-03 19:55:35 +00:00
Michael Bayne dbbd8e955f 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
2005-03-03 19:36:34 +00:00
Ray Greenwell 40eb978a96 Added a simple turn display widget (for game gardens).
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3373 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-02 02:33:46 +00:00