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())
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())