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
This commit is contained in:
Michael Bayne
2005-04-15 02:45:20 +00:00
parent 35bef9647c
commit b221524071
2 changed files with 12 additions and 2 deletions
@@ -66,7 +66,17 @@ public class CardGameManager extends GameManager
// Documentation inherited.
public void turnDidEnd ()
{}
/**
* This should be called to start a rematched game. It just starts the
* current game anew, but provides a mechanism for derived classes to
* do special things when there is a rematch.
*/
public void rematchGame ()
{
startGame();
}
/**
* Deals a hand of cards to the player at the specified index from
* the given Deck.
@@ -301,7 +301,7 @@ public class TrickCardGameManagerDelegate extends TurnGameManagerDelegate
// if all players accept the rematch, restart the game
if (getRematchRequestCount() == _cardGame.getPlayerCount()) {
_cgmgr.startGame();
_cgmgr.rematchGame();
}
}