comparison src/plugins/plugin_misc_tarot.py @ 916:1a759096ccbd

core: use of Const for profile_key + replaced '@DEFAULT@' default profile_key by '@NONE@'
author Goffi <goffi@goffi.org>
date Fri, 21 Mar 2014 16:27:09 +0100
parents 36c6495d86b0
children 301b342c697a
comparison
equal deleted inserted replaced
915:6f96ee4d8cc0 916:1a759096ccbd
16 16
17 # You should have received a copy of the GNU Affero General Public License 17 # You should have received a copy of the GNU Affero General Public License
18 # along with this program. If not, see <http://www.gnu.org/licenses/>. 18 # along with this program. If not, see <http://www.gnu.org/licenses/>.
19 19
20 from sat.core.i18n import _ 20 from sat.core.i18n import _
21 from sat.core.constants import Const as C
21 from logging import debug, info, warning, error 22 from logging import debug, info, warning, error
22 from twisted.words.xish import domish 23 from twisted.words.xish import domish
23 from twisted.words.protocols.jabber import jid 24 from twisted.words.protocols.jabber import jid
24 from twisted.internet import defer 25 from twisted.internet import defer
25 from wokkel import data_form 26 from wokkel import data_form
424 # XXX: empty hand means to the frontend "reset the display"... 425 # XXX: empty hand means to the frontend "reset the display"...
425 self.host.bridge.tarotGameNew(room_jid_s, [], profile) 426 self.host.bridge.tarotGameNew(room_jid_s, [], profile)
426 del self._sessions[raw_data["session_id"]] 427 del self._sessions[raw_data["session_id"]]
427 return defer.succeed({}) 428 return defer.succeed({})
428 429
429 def play_cards(self, player, referee, cards, profile_key='@NONE@'): 430 def play_cards(self, player, referee, cards, profile_key=C.PROF_KEY_NONE):
430 """Must be call by player when the contrat is selected 431 """Must be call by player when the contrat is selected
431 @param player: player's name 432 @param player: player's name
432 @param referee: arbiter jid 433 @param referee: arbiter jid
433 @cards: cards played (list of tuples) 434 @cards: cards played (list of tuples)
434 @profile_key: profile 435 @profile_key: profile