From 70a23b7d80754e7bf90cf5ccc6d2280ba858cae2 Mon Sep 17 00:00:00 2001 From: Andrzej Kapolka Date: Fri, 19 Nov 2004 19:21:46 +0000 Subject: [PATCH] Changes suggested by Mike. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3225 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../parlor/card/client/CardGameController.java | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/java/com/threerings/parlor/card/client/CardGameController.java b/src/java/com/threerings/parlor/card/client/CardGameController.java index 0407b6f6c..455fe29c8 100644 --- a/src/java/com/threerings/parlor/card/client/CardGameController.java +++ b/src/java/com/threerings/parlor/card/client/CardGameController.java @@ -33,21 +33,15 @@ import com.threerings.parlor.game.GameController; * accepting dealt hands. */ public abstract class CardGameController extends GameController - implements CardCodes + implements CardCodes, CardReceiver { // Documentation inherited. public void willEnterPlace (PlaceObject plobj) { super.willEnterPlace(plobj); - CardReceiver cgr = new CardReceiver() { - public void receivedHand (Hand hand) { - handDealt(hand); - } - }; - _ctx.getClient().getInvocationDirector().registerReceiver( - new CardDecoder(cgr)); + new CardDecoder(this)); } // Documentation inherited. @@ -60,10 +54,11 @@ public abstract class CardGameController extends GameController } /** - * Called when the server deals the client a new hand of cards. + * Called when the server deals the client a new hand of cards. Default + * implementation does nothing. * * @param hand the hand dealt to the user */ - protected void handDealt (Hand hand) + public void receivedHand (Hand hand) {} }