comparison frontends/wix/chat.py @ 90:4020931569b8

Tarot Game: session initialization
author Goffi <goffi@goffi.org>
date Sun, 23 May 2010 16:39:05 +0930
parents 66d784082930
children 1ca5f254ce41
comparison
equal deleted inserted replaced
89:23caf1051099 90:4020931569b8
106 self.subjectBox.Hide() 106 self.subjectBox.Hide()
107 self.__eraseMenus() 107 self.__eraseMenus()
108 self.__createMenus_O2O() 108 self.__createMenus_O2O()
109 self.historyPrint(profile=self.host.profile) 109 self.historyPrint(profile=self.host.profile)
110 110
111 def startGame(self, game_type, players): 111 def startGame(self, game_type, referee, players):
112 """Configure the chat window to start a game""" 112 """Configure the chat window to start a game"""
113 if game_type=="Tarot": 113 if game_type=="Tarot":
114 debug (_("configure chat window for Tarot game")) 114 debug (_("configure chat window for Tarot game"))
115 self.tarot_panel = CardPanel(self, players, self.nick) 115 self.tarot_panel = CardPanel(self, referee, players, self.nick)
116 self.sizer.Prepend(self.tarot_panel, 0, flag=wx.EXPAND) 116 self.sizer.Prepend(self.tarot_panel, 0, flag=wx.EXPAND)
117 self.sizer.Layout() 117 self.sizer.Layout()
118 self.Fit() 118 self.Fit()
119 119
120 def getGame(self, game_type): 120 def getGame(self, game_type):
246 warning (_("FIXME: temporary menu, must be changed")) 246 warning (_("FIXME: temporary menu, must be changed"))
247 if len(self.occupants) != 4: 247 if len(self.occupants) != 4:
248 err_dlg = wx.MessageDialog(self, _("You need to be exactly 4 peoples in the room to start a Tarot game"), _("Can't start game"), style = wx.OK | wx.ICON_ERROR) #FIXME: gof: temporary only, need to choose the people with who the game has to be started 248 err_dlg = wx.MessageDialog(self, _("You need to be exactly 4 peoples in the room to start a Tarot game"), _("Can't start game"), style = wx.OK | wx.ICON_ERROR) #FIXME: gof: temporary only, need to choose the people with who the game has to be started
249 err_dlg.ShowModal() 249 err_dlg.ShowModal()
250 else: 250 else:
251 self.host.bridge.createTarotGame(self.id, list(self.occupants), self.host.profile) 251 self.host.bridge.tarotGameCreate(self.id, list(self.occupants), self.host.profile)