Esempio n. 1
0
 def joinroom(self,roomid=-1, tableid=3):
     res=Buffer()
     res.write_ushort(1032)
     res.write_short(roomid)
     res.write_byte(tableid)
     res.write_string('')
     self.ro.sendData(res.getValue())
Esempio n. 2
0
 def drop(self):
     res=Buffer()
     res.write_ushort(1058)
     i=random.choice(range(len(self.pai)))
     pai=self.pai[i]
     self.pai=self.pai[:i]+self.pai[i+1:]
     print '======================================================='
     print '->my_pai[%s]: %s' % (self.tableid, self.pai)
     res.write_byte(ord(pai))
     self.ro.sendData(res.getValue())