diff libervia.tac @ 39:305e81c7a32c

Tarot game: a game can now be finished
author Goffi <goffi@goffi.org>
date Sun, 22 May 2011 00:15:01 +0200
parents 7bea2ae0c4fb
children 7782a786b2f0
line wrap: on
line diff
--- a/libervia.tac	Thu May 19 02:00:59 2011 +0200
+++ b/libervia.tac	Sun May 22 00:15:01 2011 +0200
@@ -137,6 +137,11 @@
         """Tell to the server that we are ready to start the game"""
         profile = self.session.sat_profile
         self.sat_host.bridge.tarotGameContratChoosed(player_nick, referee, contrat, profile)
+    
+    def jsonrpc_tarotGamePlayCards(self, player_nick, referee, cards):
+        """Tell to the server that we are ready to start the game"""
+        profile = self.session.sat_profile
+        self.sat_host.bridge.tarotGamePlayCards(player_nick, referee, cards, profile)
 
 class Register(jsonrpc.JSONRPC):
     """This class manage the registration procedure with SàT
@@ -362,7 +367,7 @@
         self.bridge.register("connected", self.signal_handler.connected)
         self.bridge.register("connectionError", self.signal_handler.connectionError)
         for signal_name in ['presenceUpdate', 'personalEvent', 'newMessage', 'roomJoined', 'roomUserJoined', 'roomUserLeft', 'tarotGameStarted', 'tarotGameNew',
-                            'tarotGameChooseContrat', 'tarotGameShowCards']:
+                            'tarotGameChooseContrat', 'tarotGameShowCards', 'tarotGameInvalidCards', 'tarotGameCardsPlayed', 'tarotGameYourTurn']:
             self.bridge.register(signal_name, self.signal_handler.getGenericCb(signal_name))
         root.putChild('json_signal_api', self.signal_handler)
         root.putChild('json_api', MethodHandler(self))